{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/emporix/json-schema/emporix-imported-record-page-schema.json",
  "title": "Imported record page",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-data-api-openapi.yml#/components/schemas/ImportedRecordPage",
  "allOf": [
    {
      "$ref": "#/$defs/Page"
    },
    {
      "type": "object",
      "properties": {
        "content": {
          "type": "array",
          "description": "The imported records on this page.",
          "items": {
            "$ref": "#/$defs/ImportedRecord"
          }
        }
      }
    }
  ],
  "$defs": {
    "ImportedRecord": {
      "title": "Imported record",
      "type": "object",
      "description": "A record that was imported. Holds keys and outcome; for composite parents it also holds the embedded child arrays.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The imported-record identifier."
        },
        "configId": {
          "type": "string",
          "format": "uuid",
          "description": "The configuration the record belongs to."
        },
        "streamId": {
          "type": "string",
          "format": "uuid",
          "description": "The stream that produced the record."
        },
        "runId": {
          "type": "string",
          "format": "uuid",
          "description": "The run that last touched the record."
        },
        "targetEntity": {
          "type": "string",
          "description": "The target writer code."
        },
        "targetType": {
          "type": "string",
          "description": "The target type."
        },
        "naturalKey": {
          "type": "string",
          "description": "The source natural key."
        },
        "targetId": {
          "type": "string",
          "description": "The deterministic Emporix instance ID the record was written under. It's derived from the natural key and allows the record to be located in the target."
        },
        "fields": {
          "type": "object",
          "description": "The stored fields."
        },
        "outcome": {
          "type": "string",
          "description": "The last outcome, one of `UPSERTED`, `DELETED`, `DELETED_TARGET`, `FAILED`, or `DRY_RUN`."
        },
        "importedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the record was last imported."
        }
      }
    },
    "Page": {
      "title": "Page",
      "type": "object",
      "description": "Pagination metadata for a page of results.",
      "properties": {
        "totalElements": {
          "type": "integer",
          "description": "The total number of elements across all pages."
        },
        "totalPages": {
          "type": "integer",
          "description": "The total number of pages."
        },
        "number": {
          "type": "integer",
          "description": "The current zero-based page number."
        },
        "size": {
          "type": "integer",
          "description": "The page size."
        }
      }
    }
  }
}