{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avetta/json-schema/avetta-3-29-14-crew-member-worker-resource-schema.json",
  "title": "3.29.14_CrewMemberWorkerResource",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avetta-pegasusscope-scope-crew-controller-api-openapi.yml#/components/schemas/3.29.14_CrewMemberWorkerResource",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32"
    },
    "leader": {
      "type": "boolean"
    },
    "defaultCrew": {
      "type": "boolean"
    },
    "worker": {
      "$ref": "#/$defs/3.29.14_WorkerSummaryResource"
    }
  },
  "$defs": {
    "3.29.14_AddressResource": {
      "required": [
        "country"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "address": {
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "town": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "postcode": {
          "maxLength": 15,
          "minLength": 0,
          "type": "string"
        },
        "country": {
          "maxLength": 2,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "3.29.14_KeyedIntegerClientResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "clientKey": {
          "$ref": "#/$defs/3.29.14_NaturalKeyResource"
        }
      }
    },
    "3.29.14_KeyedIntegerResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "3.29.14_KeyedStringResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "3.29.14_NaturalKeyResource": {
      "type": "object",
      "properties": {
        "extSysKey": {
          "type": "string"
        },
        "idKey": {
          "type": "string"
        }
      }
    },
    "3.29.14_NextOfKinResource": {
      "type": "object",
      "properties": {
        "firstName": {
          "maxLength": 35,
          "minLength": 0,
          "type": "string"
        },
        "lastName": {
          "maxLength": 45,
          "minLength": 0,
          "type": "string"
        },
        "phone": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "email": {
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "relationship": {
          "type": "string",
          "enum": [
            "SPOUSE",
            "PARTNER",
            "MOTHER",
            "FATHER",
            "BROTHER",
            "SISTER",
            "SON",
            "DAUGHTER",
            "BOYFRIEND",
            "GIRLFRIEND",
            "SON_IN_LAW",
            "DAUGHTER_IN_LAW",
            "MOTHER_IN_LAW",
            "FATHER_IN_LAW",
            "OTHER",
            "DOCTOR"
          ]
        },
        "updateTime": {
          "type": "string"
        }
      }
    },
    "3.29.14_ScopeDefaultCompanyResource": {
      "type": "object",
      "properties": {
        "scope": {
          "$ref": "#/$defs/3.29.14_ScopeDetailResource"
        },
        "company": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        }
      }
    },
    "3.29.14_ScopeDetailResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        },
        "fatigueLimit": {
          "type": "integer",
          "format": "int32"
        },
        "siteId": {
          "type": "integer",
          "format": "int32"
        },
        "realmId": {
          "type": "integer",
          "format": "int32"
        },
        "concoId": {
          "type": "integer",
          "format": "int32"
        },
        "type": {
          "type": "string",
          "enum": [
            "SYSTEM",
            "REALM",
            "SITE",
            "LOCATION",
            "CONCO_WEB",
            "EMPLOYEE",
            "UNKNOWN"
          ]
        },
        "typeDisplayName": {
          "type": "string"
        },
        "ownerName": {
          "type": "string"
        },
        "connectAccountId": {
          "type": "string"
        },
        "connectClient": {
          "type": "boolean"
        },
        "parentId": {
          "type": "integer",
          "format": "int32"
        },
        "realm": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "site": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "conco": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "topLevel": {
          "type": "boolean"
        }
      }
    },
    "3.29.14_SiteLegacyIdResource": {
      "type": "object",
      "properties": {
        "site": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "legacyIdName": {
          "type": "string"
        },
        "legacyId": {
          "type": "string"
        }
      }
    },
    "3.29.14_WorkerSummaryResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "photoLink": {
          "type": "string"
        },
        "companies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/3.29.14_KeyedIntegerClientResource"
          }
        },
        "email1": {
          "type": "string"
        },
        "email2": {
          "type": "string"
        },
        "uniqueEmail": {
          "type": "string"
        },
        "phone1": {
          "type": "string"
        },
        "phone2": {
          "type": "string"
        },
        "address": {
          "$ref": "#/$defs/3.29.14_AddressResource"
        },
        "nextOfKin": {
          "$ref": "#/$defs/3.29.14_NextOfKinResource"
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "APPROVED",
            "ARCHIVED"
          ]
        },
        "locale": {
          "type": "string"
        },
        "mergedToPersonId": {
          "type": "integer",
          "format": "int32"
        },
        "createTime": {
          "type": "string"
        },
        "updateTime": {
          "type": "string"
        },
        "personTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "SITE_CONTACT",
              "PERSONAL_CONTACT",
              "USER",
              "EMPLOYEE",
              "CONTRACTOR",
              "VISITOR",
              "SUPERUSER",
              "UNICORN_USER",
              "INVALID_PERSON",
              "MASTERKEY",
              "CARDHOLDER",
              "PAST_CARDHOLDER",
              "INVISIBLE",
              "IMPOSSIBLE"
            ]
          }
        },
        "email": {
          "type": "string"
        },
        "blocked": {
          "type": "boolean"
        },
        "blockRecursive": {
          "type": "boolean"
        },
        "defaultCompanies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/3.29.14_ScopeDefaultCompanyResource"
          }
        },
        "siteLegacyIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/3.29.14_SiteLegacyIdResource"
          }
        },
        "externalIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/3.29.14_KeyedStringResource"
          }
        },
        "clientKey": {
          "$ref": "#/$defs/3.29.14_NaturalKeyResource"
        }
      }
    }
  }
}