{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://devopsmigration.io/schema/schema.processors.tfsworkitemdeleteprocessor.json",
  "title": "TfsWorkItemDeleteProcessor",
  "description": "The `WorkItemDelete` processor allows you to delete any amount of work items that meet the query.\r\n **DANGER:** This is not a recoverable action and should be use with extream caution.",
  "type": "object",
  "properties": {
    "Enabled": {
      "description": "If set to `true` then the processor will run. Set to `false` and the processor will not run.",
      "type": "boolean"
    },
    "Enrichers": {
      "description": "List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors.",
      "type": "array"
    },
    "FilterWorkItemsThatAlreadyExistInTarget": {
      "description": "Gets or sets a value indicating whether to filter out work items that already exist in the target before deletion. Typically used to avoid deleting items that shouldn't be removed.",
      "type": "boolean"
    },
    "PauseAfterEachWorkItem": {
      "description": "Gets or sets a value indicating whether to pause after each work item is deleted for review or debugging purposes.",
      "type": "boolean"
    },
    "RefName": {
      "description": "`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.",
      "type": "string"
    },
    "SourceName": {
      "description": "This is the `IEndpoint` that will be used as the source of the Migration. Can be null for a write only processor.",
      "type": "string"
    },
    "TargetName": {
      "description": "This is the `IEndpoint` that will be used as the Target of the Migration. Can be null for a read only processor.",
      "type": "string"
    },
    "WIQLQuery": {
      "description": "Gets or sets the WIQL query used to select work items for deletion. Should return a list of work item IDs.",
      "type": "string",
      "default": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc"
    },
    "WorkItemCreateRetryLimit": {
      "description": "Gets or sets the number of retry attempts for work item deletion operations when they fail due to transient errors.",
      "type": "integer"
    },
    "WorkItemIDs": {
      "description": "Gets or sets a specific list of work item IDs to delete. When specified, takes precedence over the WIQL query.",
      "type": "array"
    }
  },
  "required": [
    "enabled",
    "sourceName",
    "targetName"
  ]
}