{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oyster-hr/json-schema/oyster-hr-agreements-schema.json",
  "title": "agreements",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oyster-hr-offboarding-api-openapi.yml#/components/schemas/agreements",
  "type": "array",
  "items": {
    "$ref": "#/$defs/agreement"
  },
  "$defs": {
    "agreement": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "state": {
          "enum": [
            "PENDING",
            "DRAFT",
            "VERIFIED",
            "READY_TO_SIGN",
            "SIGNED"
          ]
        },
        "type": {
          "type": "string"
        },
        "parties": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "COMPANY",
              "TEAM_MEMBER",
              "OYSTER"
            ]
          }
        },
        "preview": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "contentType": {
              "type": "string"
            }
          }
        }
      },
      "required": [
        "id",
        "name",
        "state",
        "type",
        "parties"
      ]
    }
  }
}