get:
  summary: Returns a list of (optionally filtered) cooperative asset transactions.
  description: Returns the list of (optionally filtered) cooperative asset transactions which are visible to the current subject or any of it's assumed roles.
  tags:
    - hs-office-coopAssets
  operationId: getListOfCoopAssets
  parameters:
    - $ref: 'auth.yaml#/components/parameters/currentSubject'
    - $ref: 'auth.yaml#/components/parameters/assumedRoles'
    - name: membershipUuid
      in: query
      required: false
      schema:
        type: string
        format: uuid
      description: Optional UUID of the related membership.
    - name: fromValueDate
      in: query
      required: false
      schema:
        type: string
        format: date
      description: Optional value date range start (inclusive).
    - name: toValueDate
      in: query
      required: false
      schema:
        type: string
        format: date
      description: Optional value date range end (inclusive).
  responses:
    "200":
      description: OK
      content:
        'application/json':
          schema:
            type: array
            items:
              $ref: 'hs-office-coopassets-schemas.yaml#/components/schemas/HsOfficeCoopAssetsTransaction'
    "401":
      $ref: 'error-responses.yaml#/components/responses/Unauthorized'
    "403":
      $ref: 'error-responses.yaml#/components/responses/Forbidden'

post:
  summary: Adds a new cooperative asset transaction.
  tags:
    - hs-office-coopAssets
  operationId: postNewCoopAssetTransaction
  parameters:
    - $ref: 'auth.yaml#/components/parameters/currentSubject'
    - $ref: 'auth.yaml#/components/parameters/assumedRoles'
  requestBody:
    description: A JSON object describing the new cooperative assets transaction.
    required: true
    content:
      application/json:
        schema:
          $ref: 'hs-office-coopassets-schemas.yaml#/components/schemas/HsOfficeCoopAssetsTransactionInsert'
  responses:
    "201":
      description: Created
      content:
        'application/json':
          schema:
            $ref: 'hs-office-coopassets-schemas.yaml#/components/schemas/HsOfficeCoopAssetsTransaction'
    "401":
      $ref: 'error-responses.yaml#/components/responses/Unauthorized'
    "403":
      $ref: 'error-responses.yaml#/components/responses/Forbidden'
    "409":
      $ref: 'error-responses.yaml#/components/responses/Conflict'
