{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-gouv-fr/json-schema/api-gouv-fr-activity-page-schema.json",
  "title": "ActivityPage",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-gouv-fr-site-api-openapi.yml#/components/schemas/ActivityPage",
  "properties": {
    "data": {
      "description": "The page data",
      "items": {
        "$ref": "#/$defs/Activity__read"
      },
      "type": "array"
    },
    "next_page": {
      "description": "The next page URL if exists",
      "type": "string"
    },
    "page": {
      "description": "The current page",
      "minimum": 1,
      "type": "integer"
    },
    "page_size": {
      "description": "The page size used for pagination",
      "minimum": 0,
      "type": "integer"
    },
    "previous_page": {
      "description": "The previous page URL if exists",
      "type": "string"
    },
    "total": {
      "description": "The total paginated items",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "page",
    "page_size",
    "total"
  ],
  "type": "object",
  "$defs": {
    "Activity__read": {
      "properties": {
        "actor": {
          "description": "Who performed the action",
          "readOnly": true,
          "type": "object"
        },
        "changes": {
          "description": "Changed attributes as list",
          "items": {
            "description": "Changed attributes as list",
            "readOnly": true,
            "type": "string"
          },
          "readOnly": true,
          "type": "array"
        },
        "created_at": {
          "description": "When the action has been performed",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "extras": {
          "description": "Extras attributes as key-value pairs",
          "readOnly": true,
          "type": "object"
        },
        "icon": {
          "description": "The icon of the activity",
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "type": "string"
        },
        "key": {
          "description": "The key of the activity",
          "readOnly": true,
          "type": "string"
        },
        "label": {
          "description": "The label of the activity",
          "readOnly": true,
          "type": "string"
        },
        "organization": {
          "allOf": [
            {
              "$ref": "#/$defs/OrganizationReference"
            }
          ],
          "description": "The organization who performed the action",
          "readOnly": true
        },
        "related_to": {
          "description": "The activity target name",
          "readOnly": true,
          "type": "string"
        },
        "related_to_id": {
          "description": "The activity target object identifier",
          "readOnly": true,
          "type": "string"
        },
        "related_to_kind": {
          "description": "The activity target object class name",
          "readOnly": true,
          "type": "string"
        },
        "related_to_url": {
          "description": "The activity target url",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "actor",
        "created_at",
        "id",
        "related_to"
      ],
      "type": "object"
    },
    "Badge__read": {
      "properties": {
        "kind": {
          "type": "string"
        }
      },
      "required": [
        "kind"
      ],
      "type": "object"
    },
    "BaseReference": {
      "properties": {
        "class": {
          "description": "The object class",
          "type": "string"
        },
        "id": {
          "description": "The object unique identifier",
          "type": "string"
        }
      },
      "required": [
        "class",
        "id"
      ],
      "type": "object"
    },
    "OrganizationPermissions": {
      "properties": {
        "delete": {
          "type": "boolean"
        },
        "edit": {
          "type": "boolean"
        },
        "harvest": {
          "type": "boolean"
        },
        "members": {
          "type": "boolean"
        },
        "private": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "OrganizationReference": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseReference"
        },
        {
          "properties": {
            "acronym": {
              "maxLength": 128,
              "type": "string"
            },
            "badges": {
              "items": {
                "allOf": [
                  {
                    "$ref": "#/$defs/Badge__read"
                  }
                ],
                "readOnly": true
              },
              "readOnly": true,
              "type": "array"
            },
            "logo": {
              "description": "URL of the image",
              "readOnly": true,
              "type": "string"
            },
            "logo_thumbnail": {
              "description": "URL of the cropped and squared image (100x100)",
              "readOnly": true,
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "page": {
              "description": "Link to the udata web page for this organization",
              "readOnly": true,
              "type": "string"
            },
            "permissions": {
              "allOf": [
                {
                  "$ref": "#/$defs/OrganizationPermissions"
                }
              ],
              "readOnly": true
            },
            "slug": {
              "maxLength": 255,
              "readOnly": true,
              "type": "string"
            },
            "uri": {
              "description": "Link to the API endpoint for this organization",
              "readOnly": true,
              "type": "string"
            }
          },
          "required": [
            "name",
            "slug"
          ],
          "type": "object"
        }
      ]
    }
  }
}