{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-thepub-v1-feed-template-permissions-response-schema.json",
  "title": "FeedTemplatePermissionsResponse",
  "description": "The response for `FeedTemplatePermissions`",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-data-feeds-api-openapi.yml#/components/schemas/s12.thepub.v1.FeedTemplatePermissionsResponse",
  "type": "object",
  "properties": {
    "metadata": {
      "description": "The metadata for the feed.",
      "allOf": [
        {
          "$ref": "#/$defs/s12.thepub.v1.FeedMetadata"
        }
      ]
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "#/$defs/s12.thepub.v1.FeedTemplatePermissionsResponse.FeedTemplatePermission"
      },
      "description": "The template permissions returned."
    }
  },
  "$defs": {
    "s12.thepub.v1.FeedMetadata": {
      "type": "object",
      "properties": {
        "next_page": {
          "type": "string",
          "description": "The path to fetch the next page on."
        },
        "remaining_records": {
          "type": "integer",
          "format": "int32",
          "description": "Estimated remaining records."
        }
      },
      "description": "The metadata returned on a feed",
      "title": "FeedMetadata"
    },
    "s12.thepub.v1.FeedTemplatePermissionsResponse.FeedTemplatePermission": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of template permission."
        },
        "template_id": {
          "type": "string",
          "description": "ID of template."
        },
        "permission": {
          "description": "Permission.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.thepub.v1.FeedTemplatePermissionsResponse.FeedTemplatePermission.Permission"
            }
          ]
        },
        "assignee_type": {
          "description": "Type of assignee.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.thepub.v1.FeedTemplatePermissionsResponse.FeedTemplatePermission.AssigneeType"
            }
          ]
        },
        "assignee_id": {
          "type": "string",
          "description": "ID of the assignee."
        },
        "organisation_id": {
          "type": "string",
          "description": "ID of the organisation."
        }
      },
      "description": "A template permission returned from `FeedTemplatePermissions`",
      "title": "FeedTemplatePermission"
    },
    "s12.thepub.v1.FeedTemplatePermissionsResponse.FeedTemplatePermission.AssigneeType": {
      "type": "string",
      "enum": [
        "user",
        "role"
      ],
      "default": "user",
      "title": "- user: User\n - role: Role"
    },
    "s12.thepub.v1.FeedTemplatePermissionsResponse.FeedTemplatePermission.Permission": {
      "type": "string",
      "enum": [
        "unknown",
        "view",
        "edit",
        "delete"
      ],
      "default": "unknown",
      "description": " - unknown: Unknown\n - view: Can View.\n - edit: Can Edit.\n - delete: Can Delete."
    }
  }
}