{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-experience-cloud/json-schema/salesforce-experience-cloud-record-ui-representation-schema.json",
  "title": "RecordUiRepresentation",
  "description": "Complete UI representation for one or more records",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-experience-cloud-records-api-openapi.yml#/components/schemas/RecordUiRepresentation",
  "type": "object",
  "properties": {
    "layoutUserStates": {
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    },
    "layouts": {
      "type": "object",
      "description": "Map of object API names to layout representations",
      "additionalProperties": {
        "type": "object"
      }
    },
    "objectInfos": {
      "type": "object",
      "description": "Map of object API names to object info",
      "additionalProperties": {
        "$ref": "#/$defs/ObjectInfoRepresentation"
      }
    },
    "records": {
      "type": "object",
      "description": "Map of record IDs to record representations",
      "additionalProperties": {
        "$ref": "#/$defs/RecordRepresentation"
      }
    }
  },
  "$defs": {
    "FieldValueRepresentation": {
      "type": "object",
      "description": "Field value with display formatting",
      "properties": {
        "displayValue": {
          "type": "string",
          "description": "Formatted display value (locale-aware)"
        },
        "value": {
          "description": "Raw field value"
        }
      }
    },
    "ObjectInfoRepresentation": {
      "type": "object",
      "description": "Object metadata for UI rendering",
      "properties": {
        "apiName": {
          "type": "string",
          "description": "API name of the object"
        },
        "associateEntityType": {
          "type": "string"
        },
        "associateParentEntity": {
          "type": "string"
        },
        "childRelationships": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "childObjectApiName": {
                "type": "string"
              },
              "fieldName": {
                "type": "string"
              },
              "junctionIdListNames": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "junctionReferenceTo": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "relationshipName": {
                "type": "string"
              }
            }
          }
        },
        "createable": {
          "type": "boolean"
        },
        "custom": {
          "type": "boolean"
        },
        "defaultRecordTypeId": {
          "type": "string"
        },
        "deletable": {
          "type": "boolean"
        },
        "feedEnabled": {
          "type": "boolean"
        },
        "fields": {
          "type": "object",
          "description": "Map of field API names to field metadata",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "apiName": {
                "type": "string"
              },
              "compound": {
                "type": "boolean"
              },
              "compoundComponentName": {
                "type": "string"
              },
              "compoundFieldName": {
                "type": "string"
              },
              "controllerName": {
                "type": "string"
              },
              "controllingFields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "createable": {
                "type": "boolean"
              },
              "custom": {
                "type": "boolean"
              },
              "dataType": {
                "type": "string"
              },
              "extraTypeInfo": {
                "type": "string"
              },
              "filterable": {
                "type": "boolean"
              },
              "filteredLookupInfo": {
                "type": "object"
              },
              "highScaleNumber": {
                "type": "boolean"
              },
              "htmlFormatted": {
                "type": "boolean"
              },
              "inlineHelpText": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "length": {
                "type": "integer"
              },
              "nameField": {
                "type": "boolean"
              },
              "polymorphicForeignKey": {
                "type": "boolean"
              },
              "precision": {
                "type": "integer"
              },
              "reference": {
                "type": "boolean"
              },
              "referenceTargetField": {
                "type": "string"
              },
              "referenceToInfos": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "relationshipName": {
                "type": "string"
              },
              "required": {
                "type": "boolean"
              },
              "scale": {
                "type": "integer"
              },
              "searchPrefilterable": {
                "type": "boolean"
              },
              "sortable": {
                "type": "boolean"
              },
              "unique": {
                "type": "boolean"
              },
              "updateable": {
                "type": "boolean"
              }
            }
          }
        },
        "keyPrefix": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "labelPlural": {
          "type": "string"
        },
        "layoutable": {
          "type": "boolean"
        },
        "mruEnabled": {
          "type": "boolean"
        },
        "nameFields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "queryable": {
          "type": "boolean"
        },
        "recordTypeInfos": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "defaultRecordTypeMapping": {
                "type": "boolean"
              },
              "master": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "recordTypeId": {
                "type": "string"
              }
            }
          }
        },
        "searchable": {
          "type": "boolean"
        },
        "themeInfo": {
          "type": "object",
          "properties": {
            "color": {
              "type": "string"
            },
            "iconUrl": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "updateable": {
          "type": "boolean"
        }
      }
    },
    "RecordRepresentation": {
      "type": "object",
      "description": "Representation of a record with field values",
      "properties": {
        "apiName": {
          "type": "string",
          "description": "API name of the sObject type"
        },
        "childRelationships": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "eTag": {
          "type": "string",
          "description": "Entity tag for optimistic concurrency"
        },
        "fields": {
          "type": "object",
          "description": "Map of field API names to field values",
          "additionalProperties": {
            "$ref": "#/$defs/FieldValueRepresentation"
          }
        },
        "id": {
          "type": "string",
          "description": "Record ID"
        },
        "lastModifiedById": {
          "type": "string"
        },
        "lastModifiedDate": {
          "type": "string",
          "format": "date-time"
        },
        "recordTypeId": {
          "type": "string"
        },
        "recordTypeInfo": {
          "type": "object",
          "properties": {
            "available": {
              "type": "boolean"
            },
            "defaultRecordTypeMapping": {
              "type": "boolean"
            },
            "master": {
              "type": "boolean"
            },
            "name": {
              "type": "string"
            },
            "recordTypeId": {
              "type": "string"
            }
          }
        },
        "systemModstamp": {
          "type": "string",
          "format": "date-time"
        },
        "weakEtag": {
          "type": "integer"
        }
      }
    }
  }
}