{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-gouv-fr/json-schema/api-gouv-fr-geopf-dataset-status-schema.json",
  "title": "GeopfDatasetStatus",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-gouv-fr-geopf-api-openapi.yml#/components/schemas/GeopfDatasetStatus",
  "properties": {
    "offerings": {
      "description": "Resources that came back from a pull as geopf offerings",
      "items": {
        "$ref": "#/$defs/GeopfOfferingResource"
      },
      "type": "array"
    },
    "pull": {
      "$ref": "#/$defs/GeopfDatasetPullMetadata__read"
    },
    "push": {
      "$ref": "#/$defs/GeopfDatasetPushMetadata__read"
    },
    "pushable": {
      "description": "Resources eligible for a push",
      "items": {
        "$ref": "#/$defs/GeopfPushableResource"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "GeopfDatasetPullMetadata__read": {
      "properties": {
        "error": {
          "description": "The last pull error, if any",
          "readOnly": true,
          "type": "string"
        },
        "last_synced_at": {
          "description": "Last successful pull date",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "status": {
          "description": "Pull status: null (never run), pending, done or error",
          "enum": [
            "pending",
            "done",
            "error"
          ],
          "readOnly": true,
          "type": "string"
        },
        "task_id": {
          "description": "The last pull Celery task's id",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "GeopfDatasetPushMetadata__read": {
      "properties": {
        "datasheet_url": {
          "description": "The cartes.gouv.fr fiche de données url for this dataset",
          "readOnly": true,
          "type": "string"
        },
        "datastore_id": {
          "description": "The geopf datastore configured for this dataset's pushes",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "GeopfOfferingResource": {
      "properties": {
        "format": {
          "description": "The resource format",
          "type": "string"
        },
        "id": {
          "description": "The resource id",
          "type": "string"
        },
        "offering": {
          "$ref": "#/$defs/GeopfResourceOfferingMetadata__read"
        },
        "title": {
          "description": "The resource title",
          "type": "string"
        },
        "url": {
          "description": "The resource url",
          "type": "string"
        }
      },
      "type": "object"
    },
    "GeopfPushableResource": {
      "properties": {
        "format": {
          "description": "The resource format",
          "type": "string"
        },
        "id": {
          "description": "The resource id",
          "type": "string"
        },
        "push": {
          "$ref": "#/$defs/GeopfResourcePushMetadata__read"
        },
        "title": {
          "description": "The resource title",
          "type": "string"
        },
        "url": {
          "description": "The resource url",
          "type": "string"
        }
      },
      "type": "object"
    },
    "GeopfResourceOfferingMetadata__read": {
      "properties": {
        "id": {
          "description": "The geopf offering id",
          "readOnly": true,
          "type": "string"
        },
        "last_synced_at": {
          "description": "Last successful pull date for this offering",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "GeopfResourcePushMetadata__read": {
      "properties": {
        "error": {
          "description": "The last push error, if any",
          "readOnly": true,
          "type": "string"
        },
        "last_synced_at": {
          "description": "Last successful push date",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "status": {
          "description": "Push status: null (never run), pending, done, error or timeout",
          "enum": [
            "pending",
            "done",
            "error",
            "timeout"
          ],
          "readOnly": true,
          "type": "string"
        },
        "stored_data_id": {
          "description": "The geopf stored_data id produced by the last push",
          "readOnly": true,
          "type": "string"
        },
        "task_id": {
          "description": "The last push Celery task's id",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}