{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oyster-hr/json-schema/oyster-hr-time-off-request-schema.json",
  "title": "timeOffRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oyster-hr-oysterhr-prepay-api-openapi.yml#/components/schemas/timeOffRequest",
  "type": "object",
  "properties": {
    "timeOffRequestId": {
      "type": "string"
    },
    "engagement": {
      "$ref": "#/$defs/timeOffEngagementDetails"
    },
    "startDate": {
      "type": "string",
      "format": "date"
    },
    "endDate": {
      "type": "string",
      "format": "date"
    },
    "firstDayDuration": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[A-Z_]+$"
    },
    "lastDayDuration": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[A-Z_]+$"
    },
    "firstDayDurationInHours": {
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "lastDayDurationInHours": {
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "state": {
      "type": "string",
      "pattern": "^[A-Z_]+$"
    },
    "type": {
      "type": "string",
      "pattern": "^[A-Z_]+$"
    },
    "requesterComments": {
      "type": [
        "string",
        "null"
      ]
    },
    "rejectionReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "type": "string",
      "pattern": "^[A-Z_]+$"
    },
    "periodInHours": {
      "type": "number",
      "format": "float"
    },
    "submittedAt": {
      "type": "string",
      "format": "date-time"
    },
    "approvedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "rejectedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "attachment": {
      "$ref": "#/$defs/attachmentDetails"
    }
  },
  "$defs": {
    "attachmentDetails": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "filename": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "contentType": {
          "type": "string"
        }
      }
    },
    "timeOffEngagementDetails": {
      "type": "object",
      "properties": {
        "engagementId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "pattern": "^[A-Z_]+$"
        },
        "countryCode": {
          "type": "string"
        }
      }
    }
  }
}