{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avetta/json-schema/avetta-3-29-14-person-competency-resource-schema.json",
  "title": "3.29.14_PersonCompetencyResource",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avetta-pegasusscope-scope-competency-assignment-controller-api-openapi.yml#/components/schemas/3.29.14_PersonCompetencyResource",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32"
    },
    "person": {
      "$ref": "#/$defs/3.29.14_KeyedIntegerClientResource"
    },
    "competency": {
      "$ref": "#/$defs/3.29.14_CompetencyDefinitionSummaryResource"
    },
    "groupCompetency": {
      "$ref": "#/$defs/3.29.14_CompetencyDefinitionSummaryResource"
    },
    "issueDate": {
      "type": "string"
    },
    "expiryDate": {
      "type": "string"
    },
    "scope": {
      "$ref": "#/$defs/3.29.14_ScopeDetailResource"
    },
    "steps": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/3.29.14_CardholderCompetencyStepResource"
      }
    },
    "stepMapComplete": {
      "type": "boolean"
    },
    "updateTime": {
      "type": "string"
    },
    "deliveredByExternalTraining": {
      "type": "boolean"
    },
    "active": {
      "type": "boolean"
    },
    "inProgress": {
      "type": "boolean"
    },
    "pendingVerifiedDocId": {
      "type": "integer",
      "format": "int32"
    },
    "pendingVerifiedDocStatusLog": {
      "$ref": "#/$defs/3.29.14_PendingDataStatusLogResource"
    },
    "sourceType": {
      "type": "string",
      "enum": [
        "PORTAL",
        "ONSITE"
      ]
    },
    "portalPurchaseFileUploadId": {
      "type": "integer",
      "format": "int32",
      "deprecated": true
    },
    "uploadFiles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/3.29.14_UploadFileResource"
      }
    },
    "comment": {
      "type": "string"
    },
    "anchor": {
      "type": "string"
    },
    "cost": {
      "type": "number"
    },
    "hours": {
      "type": "number",
      "format": "double"
    },
    "externalId": {
      "$ref": "#/$defs/3.29.14_KeyedStringResource"
    },
    "clientKey": {
      "$ref": "#/$defs/3.29.14_NaturalKeyResource"
    },
    "currentStatus": {
      "type": "string",
      "enum": [
        "PAST",
        "CURRENT",
        "FUTURE",
        "MISSING"
      ]
    },
    "activeStatus": {
      "type": "string",
      "enum": [
        "INACTIVE",
        "ACTIVE",
        "PENDING"
      ]
    },
    "rejected": {
      "type": "boolean"
    },
    "gst": {
      "type": "number"
    }
  },
  "$defs": {
    "3.29.14_CardholderCompetencyStepResource": {
      "type": "object",
      "properties": {
        "step": {
          "type": "string",
          "enum": [
            "PERMIT_TO_TRAIN",
            "TRAINED",
            "TRAINED_TT",
            "TRAINED_TP",
            "TRAINED_TE",
            "ASSESSED",
            "AUTHORISED",
            "APPOINTED"
          ]
        },
        "date": {
          "type": "string"
        },
        "mandatory": {
          "type": "boolean"
        },
        "user": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "authoriser": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "documentRequired": {
          "type": "boolean"
        },
        "uploadFileId": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "3.29.14_CompetencyDefinitionSummaryResource": {
      "type": "object",
      "properties": {
        "stubId": {
          "type": "integer",
          "format": "int32"
        },
        "competencyId": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "duration": {
          "type": "integer",
          "format": "int32"
        },
        "durationUnit": {
          "type": "string",
          "enum": [
            "Days",
            "Weeks",
            "Months",
            "Years"
          ]
        },
        "groupCompetency": {
          "type": "boolean"
        },
        "verifiedDocument": {
          "type": "boolean"
        },
        "allowTrainingBookings": {
          "type": "boolean"
        },
        "external": {
          "type": "boolean"
        },
        "active": {
          "type": "boolean"
        },
        "hideFileUpload": {
          "type": "boolean"
        },
        "externalId": {
          "$ref": "#/$defs/3.29.14_KeyedStringResource"
        },
        "clientKey": {
          "$ref": "#/$defs/3.29.14_NaturalKeyResource"
        },
        "scope": {
          "$ref": "#/$defs/3.29.14_ScopeDetailResource"
        },
        "suffix": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "global": {
          "type": "string"
        },
        "verifiedDocumentIssueMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "verifiedDocumentExpiryMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "nonVerifiedDocumentIssueMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "nonVerifiedDocumentExpiryMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        }
      }
    },
    "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_PendingDataStatusLogResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "logDateTime": {
          "type": "string"
        },
        "enteredByName": {
          "type": "string"
        },
        "setStatusTo": {
          "type": "string",
          "enum": [
            "started",
            "submitted",
            "forAssessment",
            "forEndorsement",
            "approved",
            "returned",
            "rejected",
            "terminated"
          ]
        },
        "logComment": {
          "type": "string"
        },
        "objectId": {
          "type": "integer",
          "format": "int32"
        },
        "objectType": {
          "type": "string",
          "enum": [
            "pendingCompany",
            "pendingPerson",
            "oldCardRequest",
            "pendingAssociationCompany",
            "pendingAssociationPerson",
            "pendingBooking",
            "pendingCard",
            "pendingCompetency",
            "pendingAssessment",
            "pendingCompanyComplianceSubscription",
            "pendingCompanyComplianceCerts",
            "pendingCompanyComplianceSmsReview",
            "pendingVerifiedDoc",
            "correctiveAction",
            "pendingCardholderCompetency"
          ]
        }
      }
    },
    "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_UploadFileResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "fileName": {
          "type": "string"
        },
        "fileType": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        },
        "description": {
          "type": "string"
        },
        "competencyId": {
          "type": "integer",
          "format": "int32"
        },
        "uploadTime": {
          "type": "string"
        },
        "uploadBy": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "associatedTime": {
          "type": "string"
        },
        "associatedBy": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "privateFile": {
          "type": "boolean"
        },
        "sensitiveFile": {
          "type": "boolean"
        },
        "fileLink": {
          "type": "string"
        },
        "assignmentStep": {
          "type": "string",
          "enum": [
            "PERMIT_TO_TRAIN",
            "TRAINED",
            "TRAINED_TT",
            "TRAINED_TP",
            "TRAINED_TE",
            "ASSESSED",
            "AUTHORISED",
            "APPOINTED"
          ]
        }
      }
    }
  }
}