{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/pagopa/main/json-schema/pagopa-signature-request-list-schema.json",
  "title": "SignatureRequestList",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pagopa-firma-con-io-issuer-openapi.yml#/components/schemas/SignatureRequestList",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SignatureRequestListView"
      }
    },
    "continuation_token": {
      "type": "string"
    }
  },
  "required": [
    "items"
  ],
  "$defs": {
    "Id": {
      "type": "string",
      "description": "Entity Id",
      "format": "NonEmptyString",
      "x-import": "@pagopa/ts-commons/lib/strings"
    },
    "SignatureRequestListView": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "signer_id": {
          "$ref": "#/$defs/Id"
        },
        "dossier_id": {
          "$ref": "#/$defs/Id"
        },
        "status": {
          "$ref": "#/$defs/SignatureRequestStatus"
        },
        "created_at": {
          "$ref": "#/$defs/Timestamp"
        },
        "updated_at": {
          "$ref": "#/$defs/Timestamp"
        },
        "expires_at": {
          "$ref": "#/$defs/Timestamp"
        }
      },
      "required": [
        "id",
        "signer_id",
        "dossier_id",
        "status",
        "created_at",
        "updated_at",
        "expires_at"
      ]
    },
    "SignatureRequestStatus": {
      "type": "string",
      "x-extensible-enum": [
        "DRAFT",
        "READY",
        "WAIT_FOR_SIGNATURE",
        "SIGNED",
        "REJECTED",
        "CANCELLED"
      ]
    },
    "Timestamp": {
      "type": "string",
      "format": "UTCISODateFromString",
      "description": "A date-time field in ISO-8601 format and UTC timezone.",
      "x-import": "@pagopa/ts-commons/lib/dates"
    }
  }
}