{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oyster-hr/json-schema/oyster-hr-payroll-records-schema.json",
  "title": "payrollRecords",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oyster-hr-payroll-api-openapi.yml#/components/schemas/payrollRecords",
  "type": "array",
  "items": {
    "$ref": "#/$defs/payrollRecord"
  },
  "$defs": {
    "amount": {
      "type": "object",
      "properties": {
        "decimal": {
          "type": "string",
          "pattern": "^\\d+([.]\\d+)?$"
        },
        "currencyCode": {
          "type": "string",
          "minLength": 3,
          "maxLength": 3
        }
      },
      "required": [
        "decimal",
        "currencyCode"
      ]
    },
    "payrollRecord": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "engagementId": {
          "type": [
            "string",
            "null"
          ]
        },
        "currencyCode": {
          "type": "string"
        },
        "monthlyPaymentsTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "allowancesTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "benefitsTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "bonusesTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "addOnsTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "taxesTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "trueUpsTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "oysterFeesTotalAmount": {
          "$ref": "#/$defs/amount"
        },
        "engagement": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "cutoffMonthDay": {
              "type": "integer"
            },
            "engagementType": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "cutoffMonthDay",
            "engagementType",
            "type"
          ]
        }
      },
      "required": [
        "id",
        "engagementId",
        "currencyCode",
        "monthlyPaymentsTotalAmount",
        "allowancesTotalAmount",
        "benefitsTotalAmount",
        "bonusesTotalAmount",
        "addOnsTotalAmount",
        "taxesTotalAmount",
        "trueUpsTotalAmount",
        "oysterFeesTotalAmount",
        "engagement"
      ]
    }
  }
}