openapi: 3.1.0
info:
  title: StuStaPay Terminal API
  license:
    name: AGPL-3.0
  version: 0.1.0
paths:
  /health:
    get:
      tags:
        - base
      summary: health check endpoint
      operationId: health
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
  /config:
    get:
      tags:
        - base
      summary: obtain the current terminal config
      operationId: config
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminalConfig'
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
      security:
        - OAuth2PasswordBearer: []
  /cash-register-stockings:
    get:
      tags:
        - base
      summary: obtain the list of available cash register stockings
      operationId: list_cash_register_stockings
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CashRegisterStocking'
                type: array
                title: >-
                  Response List Cash Register Stockings Cash Register Stockings
                  Get
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
      security:
        - OAuth2PasswordBearer: []
  /cash-registers:
    get:
      tags:
        - base
      summary: list all cash registers
      operationId: list_cash_registers
      security:
        - OAuth2PasswordBearer: []
      parameters:
        - name: hide_assigned
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Hide Assigned
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CashRegister'
                title: Response List Cash Registers Cash Registers Get
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /stock-up-cash-register:
    post:
      tags:
        - base
      summary: stock up a cash register
      operationId: stock_up_cash_register
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterStockUpPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /user-info:
    post:
      tags:
        - base
      summary: Obtain information about a user tag
      operationId: user_info
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserInfoPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfo'
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order:
    get:
      tags:
        - order
      summary: list all orders
      description: List all the order of the currently logged in Cashier
      operationId: list_orders
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Order'
                type: array
                title: Response List Orders Order Get
      security:
        - OAuth2PasswordBearer: []
  /order/check-sale:
    post:
      tags:
        - order
      summary: check if a sale is valid
      operationId: check_sale
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewSale'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingSale'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/book-sale:
    post:
      tags:
        - order
      summary: finish the sale and book the transactions
      operationId: book_sale
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewSale'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletedSale'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/check-topup:
    post:
      tags:
        - order
      summary: check if a top up is valid
      operationId: check_topup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTopUp'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingTopUp'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/book-topup:
    post:
      tags:
        - order
      summary: finish the top up and book the transactions
      operationId: book_topup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTopUp'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletedTopUp'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/register-pending-topup:
    post:
      tags:
        - order
      summary: >-
        Register a pending topup with the server where the sumup payment is
        still pending
      operationId: register_pending_topup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTopUp'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletedTopUp'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/cancel-pending-topup:
    post:
      tags:
        - order
      summary: Mark a pending topup as cancelled, e.g. because the sumup booking failed
      operationId: cancel_pending_topup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelOrderPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/check-ticket-scan:
    post:
      tags:
        - order
      summary: check if a ticket sale is valid
      operationId: check_ticket_scan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTicketScan'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketScanResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/check-ticket-sale:
    post:
      tags:
        - order
      summary: check if a ticket sale is valid
      operationId: check_ticket_sale
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTicketSale'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingTicketSale'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/book-ticket-sale:
    post:
      tags:
        - order
      summary: finish a ticket sale and book the transactions
      operationId: book_ticket_sale
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTicketSale'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletedTicketSale'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/register-pending-ticket-sale:
    post:
      tags:
        - order
      summary: >-
        Register a pending topup with the server where the sumup payment is
        still pending
      operationId: register_pending_ticket_sale
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTicketSale'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletedTicketSale'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/cancel-pending-ticket-sale:
    post:
      tags:
        - order
      summary: >-
        Mark a pending ticket sale as cancelled, e.g. because the sumup booking
        failed
      operationId: cancel_pending_ticket_sale
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelOrderPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/check-payout:
    post:
      tags:
        - order
      summary: check if a pay out is valid
      operationId: check_payout
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewPayOut'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingPayOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/book-payout:
    post:
      tags:
        - order
      summary: finish the pay out and book the transactions
      operationId: book_payout
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewPayOut'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletedPayOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /order/{order_id}/cancel:
    post:
      tags:
        - order
      summary: cancel information about an order
      operationId: cancel_order
      security:
        - OAuth2PasswordBearer: []
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: integer
            title: Order Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /order/{order_id}:
    get:
      tags:
        - order
      summary: get information about an order
      operationId: show
      security:
        - OAuth2PasswordBearer: []
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: integer
            title: Order Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Order'
                  - type: 'null'
                title: Response Show Order  Order Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /auth/register_terminal:
    post:
      tags:
        - auth
      summary: Register a new Terminal
      operationId: register_terminal
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TerminalRegistrationPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminalRegistrationSuccess'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /auth/logout_terminal:
    post:
      tags:
        - auth
      summary: Log out this Terminal
      operationId: logout_terminal
      responses:
        '204':
          description: Successful Response
        '404':
          description: Not found
      security:
        - OAuth2PasswordBearer: []
  /user:
    get:
      tags:
        - user
      summary: Get the currently logged in User
      operationId: get_current_user
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CurrentUser'
                  - type: 'null'
                title: Response Get Current User User Get
      security:
        - OAuth2PasswordBearer: []
  /user/check-login:
    post:
      tags:
        - user
      summary: Check if a user can login to the terminal and return his roles
      operationId: check_login_user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserTag'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckLoginResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /user/login:
    post:
      tags:
        - user
      summary: Login User
      operationId: login_user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentUser'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /user/logout:
    post:
      tags:
        - user
      summary: Logout the current user
      operationId: logout_user
      responses:
        '204':
          description: Successful Response
      security:
        - OAuth2PasswordBearer: []
  /user/create-user:
    post:
      tags:
        - user
      summary: Create a new user with the given roles
      operationId: create_user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /user/update-user-roles:
    post:
      tags:
        - user
      summary: Update the roles of a given user
      operationId: update_user_roles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /user/grant-free-ticket:
    post:
      tags:
        - user
      summary: grant a free ticket, e.g. to a volunteer
      operationId: grant_free_ticket
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewFreeTicketGrant'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /user/grant-vouchers:
    post:
      tags:
        - user
      summary: grant vouchers to a customer
      operationId: grant_vouchers
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrantVoucherPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /customer/switch_tag:
    post:
      tags:
        - customer
      summary: Switch Tag
      operationId: switch_tag
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwitchTagPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /customer/{customer_tag_uid}:
    get:
      tags:
        - customer
      summary: Obtain a customer by tag uid
      operationId: get_customer
      security:
        - OAuth2PasswordBearer: []
      parameters:
        - name: customer_tag_uid
          in: path
          required: true
          schema:
            type: integer
            title: Customer Tag Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /customer/{customer_tag_uid}/orders:
    get:
      tags:
        - customer
      summary: Obtain all orders of a customer by tag uid
      operationId: get_customer_orders
      security:
        - OAuth2PasswordBearer: []
      parameters:
        - name: customer_tag_uid
          in: path
          required: true
          schema:
            type: integer
            title: Customer Tag Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DetailedOrder'
                title: >-
                  Response Get Customer Orders Customer  Customer Tag Uid 
                  Orders Get
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /change-cash-register-balance:
    post:
      tags:
        - cashier
      summary: >-
        update the balance of a cash register by transferring money from / to a
        orga transport account
      operationId: change_cash_register_balance
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CashierAccountChangePayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /change-transport-register-balance:
    post:
      tags:
        - cashier
      summary: >-
        update the balance of a transport account by transferring money from /
        to the cash vault
      operationId: change_transport_account_balance
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransportAccountChangePayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /transfer-cash-register:
    post:
      tags:
        - cashier
      summary: transfer a cash register between two cashiers
      operationId: transfer_cash_register
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferCashRegisterPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CashRegister'
        '401':
          description: unauthorized
        '403':
          description: forbidden
        '404':
          description: not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
  /mgmtrevenue-stats:
    post:
      tags:
        - mgmt
      summary: Get revenue statistics for the current node
      operationId: get_revenue_stats
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimeseriesStatsQuery'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevenueStats'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    Account:
      properties:
        node_id:
          type: integer
          title: Node Id
        id:
          type: integer
          title: Id
        type:
          $ref: '#/components/schemas/AccountType'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        balance:
          type: number
          title: Balance
        vouchers:
          type: integer
          title: Vouchers
        user_tag_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Id
        user_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Uid
        user_tag_comment:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Comment
        restriction:
          anyOf:
            - $ref: '#/components/schemas/ProductRestriction'
            - type: 'null'
        tag_history:
          items:
            $ref: '#/components/schemas/UserTagHistoryEntry'
          type: array
          title: Tag History
        user_tag_uid_hex:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Uid Hex
          readOnly: true
      type: object
      required:
        - node_id
        - id
        - type
        - name
        - comment
        - balance
        - vouchers
        - user_tag_id
        - user_tag_uid
        - restriction
        - tag_history
        - user_tag_uid_hex
      title: Account
    AccountType:
      type: string
      enum:
        - private
        - sale_exit
        - cash_entry
        - cash_exit
        - cash_topup_source
        - cash_imbalance
        - cash_vault
        - sumup_entry
        - sumup_online_entry
        - transport
        - voucher_create
        - donation_exit
        - sepa_exit
        - cash_register
      title: AccountType
    Button:
      properties:
        till_button_id:
          type: integer
          title: Till Button Id
        quantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Quantity
        price:
          anyOf:
            - type: number
            - type: 'null'
          title: Price
      type: object
      required:
        - till_button_id
      title: Button
    CancelOrderPayload:
      properties:
        order_uuid:
          type: string
          format: uuid
          title: Order Uuid
      type: object
      required:
        - order_uuid
      title: CancelOrderPayload
    CashRegister:
      properties:
        name:
          type: string
          title: Name
        node_id:
          type: integer
          title: Node Id
        id:
          type: integer
          title: Id
        current_cashier_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Cashier Id
        current_till_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Till Id
        balance:
          type: number
          title: Balance
        account_id:
          type: integer
          title: Account Id
      type: object
      required:
        - name
        - node_id
        - id
        - current_cashier_id
        - current_till_id
        - balance
        - account_id
      title: CashRegister
    CashRegisterStocking:
      properties:
        name:
          type: string
          title: Name
        euro200:
          type: integer
          title: Euro200
          default: 0
        euro100:
          type: integer
          title: Euro100
          default: 0
        euro50:
          type: integer
          title: Euro50
          default: 0
        euro20:
          type: integer
          title: Euro20
          default: 0
        euro10:
          type: integer
          title: Euro10
          default: 0
        euro5:
          type: integer
          title: Euro5
          default: 0
        euro2:
          type: integer
          title: Euro2
          default: 0
        euro1:
          type: integer
          title: Euro1
          default: 0
        cent50:
          type: integer
          title: Cent50
          default: 0
        cent20:
          type: integer
          title: Cent20
          default: 0
        cent10:
          type: integer
          title: Cent10
          default: 0
        cent5:
          type: integer
          title: Cent5
          default: 0
        cent2:
          type: integer
          title: Cent2
          default: 0
        cent1:
          type: integer
          title: Cent1
          default: 0
        variable_in_euro:
          type: number
          title: Variable In Euro
          default: 0
        node_id:
          type: integer
          title: Node Id
        id:
          type: integer
          title: Id
        total:
          type: number
          title: Total
      type: object
      required:
        - name
        - node_id
        - id
        - total
      title: CashRegisterStocking
    CashierAccountChangePayload:
      properties:
        cashier_tag_uid:
          type: integer
          title: Cashier Tag Uid
        amount:
          type: number
          title: Amount
      type: object
      required:
        - cashier_tag_uid
        - amount
      title: CashierAccountChangePayload
    CheckLoginResult:
      properties:
        user_tag:
          $ref: '#/components/schemas/UserTag'
        roles:
          items:
            $ref: '#/components/schemas/UserRole'
          type: array
          title: Roles
      type: object
      required:
        - user_tag
        - roles
      title: CheckLoginResult
    CompletedPayOut:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        customer_tag_uid:
          type: integer
          title: Customer Tag Uid
        amount:
          type: number
          title: Amount
        customer_account_id:
          type: integer
          title: Customer Account Id
        old_balance:
          type: number
          title: Old Balance
        new_balance:
          type: number
          title: New Balance
        booked_at:
          type: string
          format: date-time
          title: Booked At
        cashier_id:
          type: integer
          title: Cashier Id
        till_id:
          type: integer
          title: Till Id
      type: object
      required:
        - uuid
        - customer_tag_uid
        - amount
        - customer_account_id
        - old_balance
        - new_balance
        - booked_at
        - cashier_id
        - till_id
      title: CompletedPayOut
    CompletedSale:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        old_balance:
          type: number
          title: Old Balance
        new_balance:
          type: number
          title: New Balance
        old_voucher_balance:
          type: integer
          title: Old Voucher Balance
        new_voucher_balance:
          type: integer
          title: New Voucher Balance
        customer_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Account Id
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        line_items:
          items:
            $ref: '#/components/schemas/PendingLineItem'
          type: array
          title: Line Items
        buttons:
          items:
            $ref: '#/components/schemas/Button'
          type: array
          title: Buttons
        id:
          type: integer
          title: Id
        booked_at:
          type: string
          format: date-time
          title: Booked At
        cashier_id:
          type: integer
          title: Cashier Id
        till_id:
          type: integer
          title: Till Id
        bon_url:
          type: string
          title: Bon Url
        used_vouchers:
          type: integer
          title: Used Vouchers
          readOnly: true
        item_count:
          type: integer
          title: Item Count
          readOnly: true
        total_price:
          type: number
          title: Total Price
          readOnly: true
      type: object
      required:
        - uuid
        - old_balance
        - new_balance
        - old_voucher_balance
        - new_voucher_balance
        - customer_account_id
        - payment_method
        - line_items
        - buttons
        - id
        - booked_at
        - cashier_id
        - till_id
        - bon_url
        - used_vouchers
        - item_count
        - total_price
      title: CompletedSale
    CompletedTicketSale:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        line_items:
          items:
            $ref: '#/components/schemas/PendingLineItem'
          type: array
          title: Line Items
        scanned_tickets:
          items:
            $ref: '#/components/schemas/TicketScanResultEntry'
          type: array
          title: Scanned Tickets
        booked_at:
          type: string
          format: date-time
          title: Booked At
        customer_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Account Id
        cashier_id:
          type: integer
          title: Cashier Id
        till_id:
          type: integer
          title: Till Id
        item_count:
          type: integer
          title: Item Count
          readOnly: true
        total_price:
          type: number
          title: Total Price
          readOnly: true
      type: object
      required:
        - uuid
        - payment_method
        - line_items
        - scanned_tickets
        - booked_at
        - customer_account_id
        - cashier_id
        - till_id
        - item_count
        - total_price
      title: CompletedTicketSale
    CompletedTopUp:
      properties:
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        customer_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Tag Uid
        customer_account_id:
          type: integer
          title: Customer Account Id
        amount:
          type: number
          title: Amount
        old_balance:
          type: number
          title: Old Balance
        new_balance:
          type: number
          title: New Balance
        uuid:
          type: string
          format: uuid
          title: Uuid
        booked_at:
          type: string
          format: date-time
          title: Booked At
        cashier_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cashier Id
        till_id:
          type: integer
          title: Till Id
      type: object
      required:
        - payment_method
        - customer_tag_uid
        - customer_account_id
        - amount
        - old_balance
        - new_balance
        - uuid
        - booked_at
        - cashier_id
        - till_id
      title: CompletedTopUp
    CreateUserPayload:
      properties:
        login:
          type: string
          title: Login
        display_name:
          type: string
          title: Display Name
        user_tag_pin:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Pin
        user_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Uid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        role_ids:
          items:
            type: integer
          type: array
          title: Role Ids
      type: object
      required:
        - login
        - display_name
        - role_ids
      title: CreateUserPayload
    CurrentUser:
      properties:
        node_id:
          type: integer
          title: Node Id
        id:
          type: integer
          title: Id
        login:
          type: string
          title: Login
        display_name:
          type: string
          title: Display Name
        active_role_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active Role Id
        active_role_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Active Role Name
        privileges:
          items:
            $ref: '#/components/schemas/Privilege'
          type: array
          title: Privileges
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        user_tag_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Id
        user_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Uid
        transport_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Transport Account Id
        cash_register_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cash Register Id
      type: object
      required:
        - node_id
        - id
        - login
        - display_name
        - privileges
      title: CurrentUser
      description: Describes a logged-in user in the system
    DetailedOrder:
      properties:
        id:
          type: integer
          title: Id
        uuid:
          type: string
          format: uuid
          title: Uuid
        total_price:
          type: number
          title: Total Price
        total_tax:
          type: number
          title: Total Tax
        total_no_tax:
          type: number
          title: Total No Tax
        cancels_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cancels Order
        booked_at:
          type: string
          format: date-time
          title: Booked At
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        order_type:
          $ref: '#/components/schemas/OrderType'
        cashier_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cashier Id
        till_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Till Id
        cash_register_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cash Register Id
        customer_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Account Id
        customer_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Tag Uid
        customer_tag_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Tag Id
        line_items:
          items:
            $ref: '#/components/schemas/LineItem'
          type: array
          title: Line Items
        till_name:
          type: string
          title: Till Name
        customer_tag_uid_hex:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Tag Uid Hex
          readOnly: true
      type: object
      required:
        - id
        - uuid
        - total_price
        - total_tax
        - total_no_tax
        - cancels_order
        - booked_at
        - payment_method
        - order_type
        - cashier_id
        - till_id
        - cash_register_id
        - customer_account_id
        - customer_tag_uid
        - customer_tag_id
        - line_items
        - till_name
        - customer_tag_uid_hex
      title: DetailedOrder
    GrantVoucherPayload:
      properties:
        vouchers:
          type: integer
          title: Vouchers
        user_tag_uid:
          type: integer
          title: User Tag Uid
      type: object
      required:
        - vouchers
        - user_tag_uid
      title: GrantVoucherPayload
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LineItem:
      properties:
        quantity:
          type: integer
          title: Quantity
        product:
          $ref: '#/components/schemas/Product'
        product_price:
          type: number
          title: Product Price
        tax_rate_id:
          type: integer
          title: Tax Rate Id
        tax_name:
          type: string
          title: Tax Name
        tax_rate:
          type: number
          title: Tax Rate
        item_id:
          type: integer
          title: Item Id
        total_tax:
          type: number
          title: Total Tax
        total_price:
          type: number
          title: Total Price
          readOnly: true
      type: object
      required:
        - quantity
        - product
        - product_price
        - tax_rate_id
        - tax_name
        - tax_rate
        - item_id
        - total_tax
        - total_price
      title: LineItem
    LoginPayload:
      properties:
        user_tag:
          $ref: '#/components/schemas/UserTag'
        user_role_id:
          type: integer
          title: User Role Id
      type: object
      required:
        - user_tag
        - user_role_id
      title: LoginPayload
    NewFreeTicketGrant:
      properties:
        user_tag_pin:
          type: string
          title: User Tag Pin
        user_tag_uid:
          type: integer
          title: User Tag Uid
        initial_voucher_amount:
          type: integer
          title: Initial Voucher Amount
          default: 0
      type: object
      required:
        - user_tag_pin
        - user_tag_uid
      title: NewFreeTicketGrant
    NewPayOut:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        customer_tag_uid:
          type: integer
          title: Customer Tag Uid
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
      type: object
      required:
        - uuid
        - customer_tag_uid
      title: NewPayOut
    NewSale:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        customer_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Tag Uid
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        used_vouchers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Used Vouchers
        buttons:
          items:
            $ref: '#/components/schemas/Button'
          type: array
          title: Buttons
      type: object
      required:
        - uuid
        - payment_method
        - buttons
      title: NewSale
    NewTicketSale:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        customer_tags:
          items:
            $ref: '#/components/schemas/UserTagScan'
          type: array
          title: Customer Tags
        payment_method:
          anyOf:
            - $ref: '#/components/schemas/PaymentMethod'
            - type: 'null'
      type: object
      required:
        - uuid
        - customer_tags
        - payment_method
      title: NewTicketSale
    NewTicketScan:
      properties:
        customer_tags:
          items:
            $ref: '#/components/schemas/UserTagScan'
          type: array
          title: Customer Tags
      type: object
      required:
        - customer_tags
      title: NewTicketScan
    NewTopUp:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        amount:
          type: number
          title: Amount
        customer_tag_uid:
          type: integer
          title: Customer Tag Uid
      type: object
      required:
        - uuid
        - payment_method
        - amount
        - customer_tag_uid
      title: NewTopUp
    Order:
      properties:
        id:
          type: integer
          title: Id
        uuid:
          type: string
          format: uuid
          title: Uuid
        total_price:
          type: number
          title: Total Price
        total_tax:
          type: number
          title: Total Tax
        total_no_tax:
          type: number
          title: Total No Tax
        cancels_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cancels Order
        booked_at:
          type: string
          format: date-time
          title: Booked At
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        order_type:
          $ref: '#/components/schemas/OrderType'
        cashier_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cashier Id
        till_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Till Id
        cash_register_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cash Register Id
        customer_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Account Id
        customer_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Tag Uid
        customer_tag_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Tag Id
        line_items:
          items:
            $ref: '#/components/schemas/LineItem'
          type: array
          title: Line Items
        customer_tag_uid_hex:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Tag Uid Hex
          readOnly: true
      type: object
      required:
        - id
        - uuid
        - total_price
        - total_tax
        - total_no_tax
        - cancels_order
        - booked_at
        - payment_method
        - order_type
        - cashier_id
        - till_id
        - cash_register_id
        - customer_account_id
        - customer_tag_uid
        - customer_tag_id
        - line_items
        - customer_tag_uid_hex
      title: Order
      description: represents a completely finished order with all relevant data
    OrderType:
      type: string
      enum:
        - sale
        - cancel_sale
        - top_up
        - pay_out
        - ticket
        - money_transfer
        - money_transfer_imbalance
        - cashier_shift_start
        - cashier_shift_end
      title: OrderType
    PaymentMethod:
      type: string
      enum:
        - cash
        - sumup
        - tag
        - sumup_online
      title: PaymentMethod
    PendingLineItem:
      properties:
        quantity:
          type: integer
          title: Quantity
        product:
          $ref: '#/components/schemas/Product'
        product_price:
          type: number
          title: Product Price
        tax_rate_id:
          type: integer
          title: Tax Rate Id
        tax_name:
          type: string
          title: Tax Name
        tax_rate:
          type: number
          title: Tax Rate
        total_price:
          type: number
          title: Total Price
          readOnly: true
      type: object
      required:
        - quantity
        - product
        - product_price
        - tax_rate_id
        - tax_name
        - tax_rate
        - total_price
      title: PendingLineItem
    PendingPayOut:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        customer_tag_uid:
          type: integer
          title: Customer Tag Uid
        amount:
          type: number
          title: Amount
        customer_account_id:
          type: integer
          title: Customer Account Id
        old_balance:
          type: number
          title: Old Balance
        new_balance:
          type: number
          title: New Balance
      type: object
      required:
        - uuid
        - customer_tag_uid
        - amount
        - customer_account_id
        - old_balance
        - new_balance
      title: PendingPayOut
    PendingSale:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        old_balance:
          type: number
          title: Old Balance
        new_balance:
          type: number
          title: New Balance
        old_voucher_balance:
          type: integer
          title: Old Voucher Balance
        new_voucher_balance:
          type: integer
          title: New Voucher Balance
        customer_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customer Account Id
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        line_items:
          items:
            $ref: '#/components/schemas/PendingLineItem'
          type: array
          title: Line Items
        buttons:
          items:
            $ref: '#/components/schemas/Button'
          type: array
          title: Buttons
        used_vouchers:
          type: integer
          title: Used Vouchers
          readOnly: true
        item_count:
          type: integer
          title: Item Count
          readOnly: true
        total_price:
          type: number
          title: Total Price
          readOnly: true
      type: object
      required:
        - uuid
        - old_balance
        - new_balance
        - old_voucher_balance
        - new_voucher_balance
        - customer_account_id
        - payment_method
        - line_items
        - buttons
        - used_vouchers
        - item_count
        - total_price
      title: PendingSale
    PendingTicketSale:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        payment_method:
          anyOf:
            - $ref: '#/components/schemas/PaymentMethod'
            - type: 'null'
        line_items:
          items:
            $ref: '#/components/schemas/PendingLineItem'
          type: array
          title: Line Items
        scanned_tickets:
          items:
            $ref: '#/components/schemas/TicketScanResultEntry'
          type: array
          title: Scanned Tickets
        item_count:
          type: integer
          title: Item Count
          readOnly: true
        total_price:
          type: number
          title: Total Price
          readOnly: true
      type: object
      required:
        - uuid
        - payment_method
        - line_items
        - scanned_tickets
        - item_count
        - total_price
      title: PendingTicketSale
    PendingTopUp:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        amount:
          type: number
          title: Amount
        customer_tag_uid:
          type: integer
          title: Customer Tag Uid
        customer_account_id:
          type: integer
          title: Customer Account Id
        old_balance:
          type: number
          title: Old Balance
        new_balance:
          type: number
          title: New Balance
      type: object
      required:
        - uuid
        - payment_method
        - amount
        - customer_tag_uid
        - customer_account_id
        - old_balance
        - new_balance
      title: PendingTopUp
    Privilege:
      type: string
      enum:
        - node_administration
        - customer_management
        - payout_management
        - create_user
        - allow_privileged_role_assignment
        - user_management
        - view_node_stats
        - cash_transport
        - terminal_login
        - supervised_terminal_login
        - can_book_orders
        - grant_free_tickets
        - grant_vouchers
      title: Privilege
    Product:
      properties:
        name:
          type: string
          title: Name
        price:
          anyOf:
            - type: number
            - type: 'null'
          title: Price
        fixed_price:
          type: boolean
          title: Fixed Price
        price_in_vouchers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Price In Vouchers
        tax_rate_id:
          type: integer
          title: Tax Rate Id
        restrictions:
          items:
            $ref: '#/components/schemas/ProductRestriction'
          type: array
          title: Restrictions
        is_locked:
          type: boolean
          title: Is Locked
        is_returnable:
          type: boolean
          title: Is Returnable
        target_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Account Id
        node_id:
          type: integer
          title: Node Id
        id:
          type: integer
          title: Id
        tax_name:
          type: string
          title: Tax Name
        tax_rate:
          type: number
          title: Tax Rate
        type:
          $ref: '#/components/schemas/ProductType'
        price_per_voucher:
          anyOf:
            - type: number
            - type: 'null'
          title: Price Per Voucher
      type: object
      required:
        - name
        - price
        - fixed_price
        - tax_rate_id
        - restrictions
        - is_locked
        - is_returnable
        - node_id
        - id
        - tax_name
        - tax_rate
        - type
      title: Product
    ProductRestriction:
      type: string
      enum:
        - under_16
        - under_18
      title: ProductRestriction
    ProductType:
      type: string
      enum:
        - discount
        - topup
        - payout
        - money_transfer
        - imbalance
        - user_defined
        - ticket
      title: ProductType
    RegisterStockUpPayload:
      properties:
        cashier_tag_uid:
          type: integer
          title: Cashier Tag Uid
        cash_register_id:
          type: integer
          title: Cash Register Id
        register_stocking_id:
          type: integer
          title: Register Stocking Id
      type: object
      required:
        - cashier_tag_uid
        - cash_register_id
        - register_stocking_id
      title: RegisterStockUpPayload
    RevenueStats:
      properties:
        from_time:
          type: string
          format: date-time
          title: From Time
        to_time:
          type: string
          format: date-time
          title: To Time
        daily_intervals:
          items:
            $ref: '#/components/schemas/StatInterval'
          type: array
          title: Daily Intervals
        hourly_intervals:
          items:
            $ref: '#/components/schemas/StatInterval'
          type: array
          title: Hourly Intervals
      type: object
      required:
        - from_time
        - to_time
        - daily_intervals
        - hourly_intervals
      title: RevenueStats
    StatInterval:
      properties:
        from_time:
          type: string
          format: date-time
          title: From Time
        to_time:
          type: string
          format: date-time
          title: To Time
        count:
          type: integer
          title: Count
        revenue:
          type: number
          title: Revenue
      type: object
      required:
        - from_time
        - to_time
        - count
        - revenue
      title: StatInterval
    SwitchTagPayload:
      properties:
        old_user_tag_pin:
          type: string
          title: Old User Tag Pin
        new_user_tag_uid:
          type: integer
          title: New User Tag Uid
        new_user_tag_pin:
          type: string
          title: New User Tag Pin
        comment:
          type: string
          title: Comment
      type: object
      required:
        - old_user_tag_pin
        - new_user_tag_uid
        - new_user_tag_pin
        - comment
      title: SwitchTagPayload
    Terminal:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          type: integer
          title: Id
        node_id:
          type: integer
          title: Node Id
        till_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Till Id
        session_uuid:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Session Uuid
        registration_uuid:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Registration Uuid
        active_user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active User Id
        active_user_role_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active User Role Id
        last_seen:
          type: string
          format: date-time
          title: Last Seen
      type: object
      required:
        - name
        - id
        - node_id
        - till_id
        - session_uuid
        - registration_uuid
        - last_seen
      title: Terminal
    TerminalButton:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        price:
          anyOf:
            - type: number
            - type: 'null'
          title: Price
        default_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Default Price
        price_in_vouchers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Price In Vouchers
        price_per_voucher:
          anyOf:
            - type: number
            - type: 'null'
          title: Price Per Voucher
        is_returnable:
          type: boolean
          title: Is Returnable
        fixed_price:
          type: boolean
          title: Fixed Price
      type: object
      required:
        - id
        - name
        - price
        - is_returnable
        - fixed_price
      title: TerminalButton
    TerminalConfig:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        event_name:
          type: string
          title: Event Name
        active_user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active User Id
        available_roles:
          items:
            $ref: '#/components/schemas/UserRole'
          type: array
          title: Available Roles
        user_privileges:
          anyOf:
            - items:
                $ref: '#/components/schemas/Privilege'
              type: array
            - type: 'null'
          title: User Privileges
        secrets:
          anyOf:
            - $ref: '#/components/schemas/TerminalUserTagSecrets'
            - type: 'null'
        till:
          anyOf:
            - $ref: '#/components/schemas/TerminalTillConfig'
            - type: 'null'
        test_mode:
          type: boolean
          title: Test Mode
        test_mode_message:
          type: string
          title: Test Mode Message
      type: object
      required:
        - id
        - name
        - description
        - event_name
        - active_user_id
        - available_roles
        - user_privileges
        - secrets
        - till
        - test_mode
        - test_mode_message
      title: TerminalConfig
    TerminalRegistrationPayload:
      properties:
        registration_uuid:
          type: string
          title: Registration Uuid
      type: object
      required:
        - registration_uuid
      title: TerminalRegistrationPayload
    TerminalRegistrationSuccess:
      properties:
        terminal:
          $ref: '#/components/schemas/Terminal'
        token:
          type: string
          title: Token
      type: object
      required:
        - terminal
        - token
      title: TerminalRegistrationSuccess
    TerminalSumupSecrets:
      properties:
        sumup_affiliate_key:
          type: string
          title: Sumup Affiliate Key
        sumup_api_key:
          type: string
          title: Sumup Api Key
        sumup_api_key_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sumup Api Key Expires At
      type: object
      required:
        - sumup_affiliate_key
        - sumup_api_key
        - sumup_api_key_expires_at
      title: TerminalSumupSecrets
    TerminalTillConfig:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        profile_name:
          type: string
          title: Profile Name
        cash_register_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cash Register Id
        cash_register_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Cash Register Name
        allow_top_up:
          type: boolean
          title: Allow Top Up
        allow_cash_out:
          type: boolean
          title: Allow Cash Out
        allow_ticket_sale:
          type: boolean
          title: Allow Ticket Sale
        allow_ticket_vouchers:
          type: boolean
          title: Allow Ticket Vouchers
        enable_ssp_payment:
          type: boolean
          title: Enable Ssp Payment
        enable_cash_payment:
          type: boolean
          title: Enable Cash Payment
        enable_card_payment:
          type: boolean
          title: Enable Card Payment
        buttons:
          anyOf:
            - items:
                $ref: '#/components/schemas/TerminalButton'
              type: array
            - type: 'null'
          title: Buttons
        sumup_secrets:
          anyOf:
            - $ref: '#/components/schemas/TerminalSumupSecrets'
            - type: 'null'
      type: object
      required:
        - id
        - name
        - description
        - profile_name
        - cash_register_id
        - cash_register_name
        - allow_top_up
        - allow_cash_out
        - allow_ticket_sale
        - allow_ticket_vouchers
        - enable_ssp_payment
        - enable_cash_payment
        - enable_card_payment
        - buttons
        - sumup_secrets
      title: TerminalTillConfig
    TerminalUserTagSecrets:
      properties:
        user_tag_secret:
          $ref: '#/components/schemas/UserTagSecret'
      type: object
      required:
        - user_tag_secret
      title: TerminalUserTagSecrets
    Ticket:
      properties:
        name:
          type: string
          title: Name
        price:
          type: number
          title: Price
        tax_rate_id:
          type: integer
          title: Tax Rate Id
        restrictions:
          items:
            $ref: '#/components/schemas/ProductRestriction'
          type: array
          title: Restrictions
        is_locked:
          type: boolean
          title: Is Locked
        initial_top_up_amount:
          type: number
          title: Initial Top Up Amount
        node_id:
          type: integer
          title: Node Id
        id:
          type: integer
          title: Id
        tax_name:
          type: string
          title: Tax Name
        tax_rate:
          type: number
          title: Tax Rate
        total_price:
          type: number
          title: Total Price
      type: object
      required:
        - name
        - price
        - tax_rate_id
        - restrictions
        - is_locked
        - initial_top_up_amount
        - node_id
        - id
        - tax_name
        - tax_rate
        - total_price
      title: Ticket
    TicketScanResult:
      properties:
        scanned_tickets:
          items:
            $ref: '#/components/schemas/TicketScanResultEntry'
          type: array
          title: Scanned Tickets
      type: object
      required:
        - scanned_tickets
      title: TicketScanResult
    TicketScanResultEntry:
      properties:
        customer_tag_uid:
          type: integer
          title: Customer Tag Uid
        customer_tag_pin:
          type: string
          title: Customer Tag Pin
        ticket:
          $ref: '#/components/schemas/Ticket'
        total_price:
          type: number
          title: Total Price
        top_up_amount:
          type: number
          title: Top Up Amount
          default: 0
        ticket_voucher:
          anyOf:
            - $ref: '#/components/schemas/TicketVoucher'
            - type: 'null'
        account:
          anyOf:
            - $ref: '#/components/schemas/Account'
            - type: 'null'
      type: object
      required:
        - customer_tag_uid
        - customer_tag_pin
        - ticket
        - total_price
      title: TicketScanResultEntry
    TicketVoucher:
      properties:
        id:
          type: integer
          title: Id
        node_id:
          type: integer
          title: Node Id
        created_at:
          type: string
          format: date-time
          title: Created At
        customer_account_id:
          type: integer
          title: Customer Account Id
        token:
          type: string
          title: Token
      type: object
      required:
        - id
        - node_id
        - created_at
        - customer_account_id
        - token
      title: TicketVoucher
    TimeseriesStatsQuery:
      properties:
        from_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: From Time
        to_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: To Time
      type: object
      required:
        - from_time
        - to_time
      title: TimeseriesStatsQuery
    TransferCashRegisterPayload:
      properties:
        source_cashier_tag_uid:
          type: integer
          title: Source Cashier Tag Uid
        target_cashier_tag_uid:
          type: integer
          title: Target Cashier Tag Uid
      type: object
      required:
        - source_cashier_tag_uid
        - target_cashier_tag_uid
      title: TransferCashRegisterPayload
    TransportAccountChangePayload:
      properties:
        orga_tag_uid:
          type: integer
          title: Orga Tag Uid
        amount:
          type: number
          title: Amount
      type: object
      required:
        - orga_tag_uid
        - amount
      title: TransportAccountChangePayload
    UpdateUserPayload:
      properties:
        user_tag_uid:
          type: integer
          title: User Tag Uid
        role_ids:
          items:
            type: integer
          type: array
          title: Role Ids
      type: object
      required:
        - user_tag_uid
        - role_ids
      title: UpdateUserPayload
    User:
      properties:
        login:
          type: string
          title: Login
        display_name:
          type: string
          title: Display Name
        user_tag_pin:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Pin
        user_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Uid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        node_id:
          type: integer
          title: Node Id
        user_tag_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Id
        transport_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Transport Account Id
        id:
          type: integer
          title: Id
        user_tag_uid_hex:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Uid Hex
          readOnly: true
      type: object
      required:
        - login
        - display_name
        - node_id
        - id
        - user_tag_uid_hex
      title: User
    UserInfo:
      properties:
        login:
          type: string
          title: Login
        display_name:
          type: string
          title: Display Name
        user_tag_pin:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Pin
        user_tag_uid:
          type: integer
          title: User Tag Uid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        node_id:
          type: integer
          title: Node Id
        user_tag_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Id
        transport_account_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Transport Account Id
        id:
          type: integer
          title: Id
        cash_register_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cash Register Id
        cash_register_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Cash Register Name
        cash_drawer_balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Cash Drawer Balance
        transport_account_balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Transport Account Balance
        assigned_roles:
          items:
            $ref: '#/components/schemas/UserRoleInfo'
          type: array
          title: Assigned Roles
        user_tag_uid_hex:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Uid Hex
          readOnly: true
      type: object
      required:
        - login
        - display_name
        - user_tag_uid
        - node_id
        - id
        - assigned_roles
        - user_tag_uid_hex
      title: UserInfo
    UserInfoPayload:
      properties:
        user_tag_uid:
          type: integer
          title: User Tag Uid
      type: object
      required:
        - user_tag_uid
      title: UserInfoPayload
    UserRole:
      properties:
        name:
          type: string
          title: Name
        is_privileged:
          type: boolean
          title: Is Privileged
          default: false
        privileges:
          items:
            $ref: '#/components/schemas/Privilege'
          type: array
          title: Privileges
        id:
          type: integer
          title: Id
        node_id:
          type: integer
          title: Node Id
      type: object
      required:
        - name
        - privileges
        - id
        - node_id
      title: UserRole
    UserRoleInfo:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        is_privileged:
          type: boolean
          title: Is Privileged
        privileges:
          items:
            $ref: '#/components/schemas/Privilege'
          type: array
          title: Privileges
        node_id:
          type: integer
          title: Node Id
        node_name:
          type: string
          title: Node Name
        is_at_current_node:
          type: boolean
          title: Is At Current Node
      type: object
      required:
        - id
        - name
        - is_privileged
        - privileges
        - node_id
        - node_name
        - is_at_current_node
      title: UserRoleInfo
    UserTag:
      properties:
        uid:
          type: integer
          title: Uid
      type: object
      required:
        - uid
      title: UserTag
    UserTagHistoryEntry:
      properties:
        user_tag_id:
          type: integer
          title: User Tag Id
        user_tag_pin:
          type: string
          title: User Tag Pin
        user_tag_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Tag Uid
        account_id:
          type: integer
          title: Account Id
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        mapping_was_valid_until:
          type: string
          format: date-time
          title: Mapping Was Valid Until
        user_tag_uid_hex:
          anyOf:
            - type: string
            - type: 'null'
          title: User Tag Uid Hex
          readOnly: true
      type: object
      required:
        - user_tag_id
        - user_tag_pin
        - user_tag_uid
        - account_id
        - mapping_was_valid_until
        - user_tag_uid_hex
      title: UserTagHistoryEntry
    UserTagScan:
      properties:
        tag_uid:
          type: integer
          title: Tag Uid
        tag_pin:
          type: string
          title: Tag Pin
        top_up_amount:
          type: number
          title: Top Up Amount
          default: 0
        voucher_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Voucher Token
      type: object
      required:
        - tag_uid
        - tag_pin
      title: UserTagScan
      description: a scanned tag before ticket sale
    UserTagSecret:
      properties:
        key0:
          type: string
          title: Key0
        key1:
          type: string
          title: Key1
      type: object
      required:
        - key0
        - key1
      title: UserTagSecret
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/register_terminal
