{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yardstick-team/json-schema/yardstick-team-status-email-approval-poc-preview-schema.json",
  "title": "StatusEmailApprovalPocPreview",
  "description": "Preview response for the fixed applications-owned status/email approval POC. It is mutation-free and only supports Interviewing -> Offer, email_type=offer, decision=review_edit.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yardstick-team-openapi.json#/components/schemas/StatusEmailApprovalPocPreview",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "application_status_email_approval_poc_preview"
      ]
    },
    "action_key": {
      "type": "string",
      "enum": [
        "application.status_email_approval_poc"
      ]
    },
    "resource_type": {
      "type": "string",
      "enum": [
        "application"
      ]
    },
    "resource_id": {
      "type": "string"
    },
    "mutated": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "application": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "current_status": {
          "type": "string",
          "enum": [
            "Interviewing"
          ]
        },
        "target_status": {
          "type": "string",
          "enum": [
            "Offer"
          ]
        },
        "mode": {
          "type": "string",
          "enum": [
            "live",
            "test"
          ]
        },
        "livemode": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "current_status",
        "target_status",
        "mode",
        "livemode"
      ],
      "additionalProperties": false
    },
    "candidate": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "display_name"
      ],
      "additionalProperties": false
    },
    "person": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "email"
      ],
      "additionalProperties": false
    },
    "job": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "job_posting_id": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "job_posting_id"
      ],
      "additionalProperties": false
    },
    "current_state": {
      "type": "object",
      "additionalProperties": {}
    },
    "proposed_state": {
      "type": "object",
      "additionalProperties": {}
    },
    "status_side_effect": {
      "type": "object",
      "additionalProperties": {}
    },
    "email_side_effect": {
      "type": "object",
      "additionalProperties": {}
    },
    "recipient": {
      "type": "object",
      "additionalProperties": {}
    },
    "sender_state": {
      "type": "object",
      "additionalProperties": {}
    },
    "template": {
      "type": "object",
      "additionalProperties": {}
    },
    "template_version": {
      "type": "object",
      "additionalProperties": {}
    },
    "template_provenance": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "prompt_redacted": {
          "type": "boolean",
          "enum": [
            true
          ]
        },
        "provider_payload_redacted": {
          "type": "boolean",
          "enum": [
            true
          ]
        }
      },
      "required": [
        "source",
        "prompt_redacted",
        "provider_payload_redacted"
      ],
      "additionalProperties": true
    },
    "required_scopes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "applications:read",
          "applications:write",
          "applications:transition_status",
          "applications:offer",
          "communications:read",
          "communications:write"
        ]
      }
    },
    "idempotency_key": {
      "type": "string"
    },
    "resource_version_precondition": {
      "type": [
        "string",
        "null"
      ]
    },
    "preview_hash": {
      "type": "string"
    },
    "input_hash": {
      "type": "string"
    },
    "approval_required": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "approval": {
      "type": "object",
      "properties": {
        "gate": {
          "type": "string"
        },
        "preview_required": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "binding": {
          "type": "object",
          "properties": {
            "required_fields": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "preview_hash",
                  "approved_action_key",
                  "approved_input_hash",
                  "approved_idempotency_key",
                  "resource_version_precondition"
                ]
              }
            },
            "approved_action_key": {
              "type": "string",
              "enum": [
                "application.status_email_approval_poc"
              ]
            },
            "preview_hash": {
              "type": "string"
            },
            "approved_input_hash": {
              "type": "string"
            },
            "approved_idempotency_key": {
              "type": "string"
            },
            "resource_version_precondition": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "required_fields",
            "approved_action_key",
            "preview_hash",
            "approved_input_hash",
            "approved_idempotency_key",
            "resource_version_precondition"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "gate",
        "preview_required",
        "binding"
      ],
      "additionalProperties": false
    },
    "audit_event_plan": {
      "type": "object",
      "properties": {
        "bind_event_type": {
          "type": "string",
          "enum": [
            "application.status_email_approval_poc.bound"
          ]
        },
        "denied_event_type": {
          "type": "string",
          "enum": [
            "application.status_email_approval_poc.denied"
          ]
        },
        "preview_audit_write": {
          "type": "boolean",
          "enum": [
            false
          ]
        }
      },
      "required": [
        "bind_event_type",
        "denied_event_type",
        "preview_audit_write"
      ],
      "additionalProperties": false
    },
    "api_event_plan": {
      "type": "object",
      "properties": {
        "preview_event_type": {
          "type": "string",
          "enum": [
            "application.status_email_approval_poc.previewed"
          ]
        },
        "bind_event_type": {
          "type": "string",
          "enum": [
            "application.status_email_approval_poc.bound"
          ]
        },
        "preview_event_write": {
          "type": "boolean",
          "enum": [
            false
          ]
        }
      },
      "required": [
        "preview_event_type",
        "bind_event_type",
        "preview_event_write"
      ],
      "additionalProperties": false
    },
    "dashboard_read_back": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "surface": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "supported_query_filters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "use": {
            "type": "string"
          },
          "availability": {
            "type": "string"
          }
        },
        "required": [
          "surface",
          "path"
        ],
        "additionalProperties": false,
        "description": "Read-back pointer for the fixed status/email approval POC."
      }
    },
    "api_read_back": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "surface": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "supported_query_filters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "use": {
            "type": "string"
          },
          "availability": {
            "type": "string"
          }
        },
        "required": [
          "surface",
          "path"
        ],
        "additionalProperties": false,
        "description": "Read-back pointer for the fixed status/email approval POC."
      }
    },
    "poc_boundary": {
      "type": "string"
    },
    "request_id": {
      "type": "string"
    }
  },
  "required": [
    "object",
    "action_key",
    "resource_type",
    "resource_id",
    "mutated",
    "application",
    "candidate",
    "person",
    "job",
    "current_state",
    "proposed_state",
    "status_side_effect",
    "email_side_effect",
    "recipient",
    "sender_state",
    "template",
    "template_version",
    "template_provenance",
    "required_scopes",
    "idempotency_key",
    "resource_version_precondition",
    "preview_hash",
    "input_hash",
    "approval_required",
    "approval",
    "audit_event_plan",
    "api_event_plan",
    "dashboard_read_back",
    "api_read_back",
    "poc_boundary",
    "request_id"
  ],
  "additionalProperties": false
}