{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-organization-project-grant-response-schema.json",
  "title": "OrganizationProjectGrantResponse",
  "description": "Effective organization-member relationship with one project.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-organizations-api-openapi.yml#/components/schemas/OrganizationProjectGrantResponse",
  "properties": {
    "created_at": {
      "description": "Timestamp of the member's first grant on this project.",
      "format": "date-time",
      "type": "string"
    },
    "permissions": {
      "description": "Current effective permissions, resolved from the role at read time.",
      "items": {
        "$ref": "#/$defs/OrganizationProjectPermission"
      },
      "type": "array"
    },
    "project_id": {
      "description": "Project whose visibility and actions are granted.",
      "format": "uuid",
      "type": "string"
    },
    "role_id": {
      "description": "Current role identifier.",
      "format": "uuid",
      "type": "string"
    },
    "role_name": {
      "description": "Current role title.",
      "type": "string"
    },
    "user_id": {
      "description": "Organization member receiving the role.",
      "format": "uuid",
      "type": "string"
    }
  },
  "required": [
    "project_id",
    "user_id",
    "role_id",
    "role_name",
    "permissions",
    "created_at"
  ],
  "type": "object",
  "$defs": {
    "OrganizationProjectPermission": {
      "description": "Stable project-scoped permissions assignable through an organization role.",
      "oneOf": [
        {
          "const": "project_read",
          "description": "Discover the project and read its retained telemetry and investigation evidence.",
          "type": "string"
        },
        {
          "const": "issue_manage",
          "description": "Triage the project's issues and logs: change issue status, priority, and assignee, and\nedit issue and log rules.",
          "type": "string"
        },
        {
          "const": "project_access_manage",
          "description": "Grant or revoke roles on this project without exceeding the actor's own permissions.",
          "type": "string"
        }
      ]
    }
  }
}