{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/la-suite/json-schema/la-suite-search-item-schema.json",
  "title": "SearchItem",
  "description": "Serialize items for search.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/la-suite-fichiers-openapi.yml#/components/schemas/SearchItem",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true,
      "description": "primary key for the record as UUID"
    },
    "abilities": {
      "type": "object",
      "additionalProperties": {},
      "description": "Return abilities of the logged-in user on the instance.",
      "readOnly": true
    },
    "ancestors_link_reach": {
      "type": "string",
      "readOnly": true
    },
    "ancestors_link_role": {
      "type": "string",
      "readOnly": true
    },
    "computed_link_reach": {
      "type": "string",
      "readOnly": true
    },
    "computed_link_role": {
      "type": "string",
      "readOnly": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "title": "Created on",
      "description": "date and time at which a record was created"
    },
    "creator": {
      "allOf": [
        {
          "$ref": "#/$defs/UserLight"
        }
      ],
      "readOnly": true
    },
    "depth": {
      "type": "string",
      "readOnly": true
    },
    "is_favorite": {
      "type": "boolean",
      "readOnly": true
    },
    "link_role": {
      "allOf": [
        {
          "$ref": "#/$defs/LinkRoleEnum"
        }
      ],
      "readOnly": true
    },
    "link_reach": {
      "readOnly": true,
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/LinkReachEnum"
        },
        {
          "$ref": "#/$defs/NullEnum"
        }
      ]
    },
    "is_restricted": {
      "type": "boolean",
      "description": "Return whether a restriction targets this folder.",
      "readOnly": true
    },
    "link_expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true,
      "title": "Link expiration date"
    },
    "has_link_password": {
      "type": "boolean",
      "description": "Return whether the item link is protected by a password.",
      "readOnly": true
    },
    "nb_accesses": {
      "type": "integer",
      "readOnly": true
    },
    "numchild": {
      "type": "string",
      "readOnly": true
    },
    "numchild_folder": {
      "type": "string",
      "readOnly": true
    },
    "path": {
      "type": "string",
      "readOnly": true
    },
    "target": {
      "allOf": [
        {
          "$ref": "#/$defs/RestrictionTarget"
        }
      ],
      "readOnly": true,
      "nullable": true
    },
    "title": {
      "type": "string",
      "maxLength": 255
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "title": "Updated on",
      "description": "date and time at which a record was last updated"
    },
    "user_role": {
      "type": "string",
      "readOnly": true
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/TypeEnum"
        }
      ],
      "readOnly": true
    },
    "upload_state": {
      "readOnly": true,
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/UploadStateEnum"
        },
        {
          "$ref": "#/$defs/NullEnum"
        }
      ]
    },
    "url": {
      "type": "string",
      "readOnly": true
    },
    "url_permalink": {
      "type": "string",
      "readOnly": true
    },
    "url_preview": {
      "type": "string",
      "readOnly": true
    },
    "filename": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "mimetype": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "main_workspace": {
      "type": "boolean",
      "readOnly": true
    },
    "size": {
      "type": [
        "integer",
        "null"
      ],
      "readOnly": true
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "deleted_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    },
    "hard_delete_at": {
      "type": "string",
      "readOnly": true
    },
    "is_wopi_supported": {
      "type": "string",
      "readOnly": true
    },
    "quota_excluded": {
      "type": "boolean",
      "readOnly": true,
      "description": "Exclude this item from its creator's storage quota computation."
    },
    "source": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Provenance of the item: a reserved drive_* value for internal operations, or the client_id of the resource server that created it."
    },
    "parents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ListItem"
      },
      "readOnly": true
    }
  },
  "required": [
    "abilities",
    "ancestors_link_reach",
    "ancestors_link_role",
    "computed_link_reach",
    "computed_link_role",
    "created_at",
    "creator",
    "deleted_at",
    "depth",
    "description",
    "hard_delete_at",
    "has_link_password",
    "id",
    "is_favorite",
    "is_restricted",
    "is_wopi_supported",
    "link_expires_at",
    "link_reach",
    "link_role",
    "main_workspace",
    "mimetype",
    "nb_accesses",
    "numchild",
    "numchild_folder",
    "parents",
    "path",
    "quota_excluded",
    "size",
    "source",
    "target",
    "title",
    "type",
    "updated_at",
    "upload_state",
    "url",
    "url_permalink",
    "url_preview",
    "user_role"
  ],
  "$defs": {
    "LinkReachEnum": {
      "enum": [
        "restricted",
        "authenticated",
        "public"
      ],
      "type": "string",
      "description": "* `restricted` - Restricted\n* `authenticated` - Authenticated\n* `public` - Public"
    },
    "LinkRoleEnum": {
      "enum": [
        "reader",
        "editor"
      ],
      "type": "string",
      "description": "* `reader` - Reader\n* `editor` - Editor"
    },
    "ListItem": {
      "type": "object",
      "description": "Serialize items with limited fields for display in lists.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true,
          "description": "primary key for the record as UUID"
        },
        "abilities": {
          "type": "object",
          "additionalProperties": {},
          "description": "Return abilities of the logged-in user on the instance.",
          "readOnly": true
        },
        "ancestors_link_reach": {
          "type": "string",
          "readOnly": true
        },
        "ancestors_link_role": {
          "type": "string",
          "readOnly": true
        },
        "computed_link_reach": {
          "type": "string",
          "readOnly": true
        },
        "computed_link_role": {
          "type": "string",
          "readOnly": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "title": "Created on",
          "description": "date and time at which a record was created"
        },
        "creator": {
          "allOf": [
            {
              "$ref": "#/$defs/UserLight"
            }
          ],
          "readOnly": true
        },
        "depth": {
          "type": "string",
          "readOnly": true
        },
        "is_favorite": {
          "type": "boolean",
          "readOnly": true
        },
        "link_role": {
          "allOf": [
            {
              "$ref": "#/$defs/LinkRoleEnum"
            }
          ],
          "readOnly": true
        },
        "link_reach": {
          "readOnly": true,
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/$defs/LinkReachEnum"
            },
            {
              "$ref": "#/$defs/NullEnum"
            }
          ]
        },
        "is_restricted": {
          "type": "boolean",
          "description": "Return whether a restriction targets this folder.",
          "readOnly": true
        },
        "link_expires_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "readOnly": true,
          "title": "Link expiration date"
        },
        "has_link_password": {
          "type": "boolean",
          "description": "Return whether the item link is protected by a password.",
          "readOnly": true
        },
        "nb_accesses": {
          "type": "integer",
          "readOnly": true
        },
        "numchild": {
          "type": "string",
          "readOnly": true
        },
        "numchild_folder": {
          "type": "string",
          "readOnly": true
        },
        "path": {
          "type": "string",
          "readOnly": true
        },
        "target": {
          "allOf": [
            {
              "$ref": "#/$defs/RestrictionTarget"
            }
          ],
          "readOnly": true,
          "nullable": true
        },
        "title": {
          "type": "string",
          "maxLength": 255
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "title": "Updated on",
          "description": "date and time at which a record was last updated"
        },
        "user_role": {
          "type": "string",
          "readOnly": true
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/TypeEnum"
            }
          ],
          "readOnly": true
        },
        "upload_state": {
          "readOnly": true,
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/$defs/UploadStateEnum"
            },
            {
              "$ref": "#/$defs/NullEnum"
            }
          ]
        },
        "url": {
          "type": "string",
          "readOnly": true
        },
        "url_permalink": {
          "type": "string",
          "readOnly": true
        },
        "url_preview": {
          "type": "string",
          "readOnly": true
        },
        "filename": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "mimetype": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "main_workspace": {
          "type": "boolean",
          "readOnly": true
        },
        "size": {
          "type": [
            "integer",
            "null"
          ],
          "readOnly": true
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "deleted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "readOnly": true
        },
        "hard_delete_at": {
          "type": "string",
          "readOnly": true
        },
        "is_wopi_supported": {
          "type": "string",
          "readOnly": true
        },
        "quota_excluded": {
          "type": "boolean",
          "readOnly": true,
          "description": "Exclude this item from its creator's storage quota computation."
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Provenance of the item: a reserved drive_* value for internal operations, or the client_id of the resource server that created it."
        }
      },
      "required": [
        "abilities",
        "ancestors_link_reach",
        "ancestors_link_role",
        "computed_link_reach",
        "computed_link_role",
        "created_at",
        "creator",
        "deleted_at",
        "depth",
        "description",
        "hard_delete_at",
        "has_link_password",
        "id",
        "is_favorite",
        "is_restricted",
        "is_wopi_supported",
        "link_expires_at",
        "link_reach",
        "link_role",
        "main_workspace",
        "mimetype",
        "nb_accesses",
        "numchild",
        "numchild_folder",
        "path",
        "quota_excluded",
        "size",
        "source",
        "target",
        "title",
        "type",
        "updated_at",
        "upload_state",
        "url",
        "url_permalink",
        "url_preview",
        "user_role"
      ]
    },
    "NullEnum": {
      "enum": [
        null
      ]
    },
    "RestrictionTarget": {
      "type": "object",
      "description": "Serialize the restricted folder a restriction points to.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true,
          "description": "primary key for the record as UUID"
        },
        "title": {
          "type": "string",
          "readOnly": true
        },
        "path": {
          "type": "string",
          "readOnly": true
        },
        "is_restricted": {
          "type": "boolean",
          "description": "Return True: the target of an existing restriction is restricted by definition.",
          "readOnly": true
        },
        "deleted": {
          "type": "boolean",
          "description": "Return whether the target is in the trash.",
          "readOnly": true
        },
        "can_access": {
          "type": "boolean",
          "description": "Return whether the request user can open the target.",
          "readOnly": true
        },
        "abilities": {
          "type": "object",
          "additionalProperties": {},
          "description": "Expose the destination's permissions without using the restriction's roles.",
          "readOnly": true
        }
      },
      "required": [
        "abilities",
        "can_access",
        "deleted",
        "id",
        "is_restricted",
        "path",
        "title"
      ]
    },
    "TypeEnum": {
      "enum": [
        "folder",
        "file",
        "restriction"
      ],
      "type": "string",
      "description": "* `folder` - Folder\n* `file` - File\n* `restriction` - Restriction"
    },
    "UploadStateEnum": {
      "enum": [
        "pending",
        "duplicating",
        "converting",
        "analyzing",
        "suspicious",
        "file_too_large_to_analyze",
        "ready"
      ],
      "type": "string",
      "description": "* `pending` - Pending\n* `duplicating` - Duplicating\n* `converting` - Converting\n* `analyzing` - Analyzing\n* `suspicious` - Suspicious\n* `file_too_large_to_analyze` - File too large to analyze\n* `ready` - Ready"
    },
    "UserLight": {
      "type": "object",
      "description": "Serialize users with limited fields.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true,
          "description": "primary key for the record as UUID"
        },
        "full_name": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "short_name": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        }
      },
      "required": [
        "full_name",
        "id",
        "short_name"
      ]
    }
  }
}