{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-issue-response-schema.json",
  "title": "IssueResponse",
  "description": "Issue resource. By default returns only `id`, `contextId`, `serverAssignedId`, `title`, `createdBy`, `createdAt`, `updatedBy`, `updatedAt`. Additional fields (e.g. `type`, `status`, `priority`, `_actions`) are returned only when requested via `?fields=<field1>,<field2>`.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-connect-issues-openapi.yml#/components/schemas/IssueResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "contextId": {
      "type": "string"
    },
    "serverAssignedId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "createdBy": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedBy": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "type": {
      "type": "string"
    },
    "percentComplete": {
      "type": "integer",
      "format": "int32"
    },
    "status": {
      "type": "string"
    },
    "priority": {
      "type": "string"
    },
    "referenceLinks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "marker": {
      "$ref": "#/$defs/Marker"
    },
    "stage": {
      "type": "string"
    },
    "index": {
      "type": "integer",
      "format": "int32",
      "deprecated": true,
      "description": "Index field for BCF compatibility. This field is deprecated as per BCF specification."
    },
    "dueDate": {
      "type": "string",
      "format": "date",
      "description": "The date by which the issue needs to be resolved (format: MM/dd/yyyy)"
    },
    "assignees": {
      "type": "array",
      "description": "The list of users or groups to be assigned to the issue in the format users:{tidUuid} or tc-groups:{groupId} where tidUuid is the user's unique identifier and groupId is the group's unique identifier.",
      "items": {
        "type": "string"
      },
      "maxLength": 50,
      "pattern": "^(users|tc-groups):[a-zA-Z0-9_-]+$"
    },
    "deleted": {
      "type": "boolean",
      "description": "Indicates if the issue is deleted. Only included in snapshot and changes APIs."
    },
    "_actions": {
      "type": "array",
      "description": "Actions the authenticated caller may perform on this issue. Only present when requested via `?fields=_actions`.\n\n**PROJECT context:**\n- ADMIN or issue creator → all 7 actions\n- Issue assignee → `edit` bucket (6 actions, no Delete)\n- Explicit `edit` ACL holder → `edit` bucket\n- Explicit `view` ACL holder or `tc-groups:*` in view → `[issue:Read, issue:ReadLinks]`\n- No ACL match → empty list (403 on direct access)\n\n**FILE context:**\n`[issue:Read, issue:Update, issue:Delete, issue:AddLinks, issue:DeleteLinks, issue:ReadLinks]` — `issue:UpdatePermissions` is **never** present.",
      "items": {
        "type": "string",
        "description": "Actions a caller may perform on an issue. Returned in `_actions` when requested via `?fields=_actions`.\n\n**Wire values (serialized as enum name):**\n- `ISSUE_READ` — view issue details; present for all actors with any ACL bucket\n- `ISSUE_UPDATE` — edit issue fields; present for `edit` bucket holders and above\n- `ISSUE_DELETE` — delete the issue; only ADMIN and issue creator (the `edit` bucket does NOT include Delete)\n- `ISSUE_ADD_LINKS` — create links on this issue; present for `edit` bucket\n- `ISSUE_DELETE_LINKS` — remove links from this issue; present for `edit` bucket\n- `ISSUE_READ_LINKS` — list links on this issue; present for `view` bucket and above\n- `ISSUE_UPDATE_PERMISSIONS` — call `PATCH /permissions`; present for `edit` bucket; **never returned in FILE context**\n\n**Context rules:**\n- PROJECT context: determined by caller role, ACL buckets, and restriction mode\n- FILE context: all values except `ISSUE_UPDATE_PERMISSIONS` are returned for any user who can access the file",
        "enum": [
          "ISSUE_UPDATE",
          "ISSUE_DELETE",
          "ISSUE_READ",
          "ISSUE_ADD_LINKS",
          "ISSUE_DELETE_LINKS",
          "ISSUE_READ_LINKS",
          "ISSUE_UPDATE_PERMISSIONS"
        ]
      }
    },
    "_bcfImportData": {
      "$ref": "#/$defs/BcfImportData",
      "description": "BCF import metadata containing original authorship and timestamps from external system"
    }
  },
  "required": [
    "contextId",
    "createdAt",
    "createdBy",
    "id",
    "serverAssignedId",
    "title",
    "updatedAt",
    "updatedBy"
  ],
  "$defs": {
    "BcfImportData": {
      "type": "object",
      "properties": {
        "creationAuthor": {
          "type": "string",
          "description": "The email or identifier of the user who originally created this issue in the external system"
        },
        "creationAuthorUuid": {
          "type": "string",
          "description": "The TidUuid of the creation author if they exist in the project at the time of import, can be null"
        },
        "modifiedAuthor": {
          "type": "string",
          "description": "The email or identifier of the user who last modified this issue in the external system"
        },
        "modifiedAuthorUuid": {
          "type": "string",
          "description": "The TidUuid of the modified author if they exist in the project at the time of import, can be null"
        },
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when this issue was originally created in the external system. (ISO-8601 variant and milliseconds precision eg. 2025-09-12T09:48:21.646+0000)"
        },
        "modifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when this issue was last modified in the external system. (ISO-8601 variant and milliseconds precision eg. 2025-09-12T09:48:21.646+0000)"
        }
      }
    },
    "Marker": {
      "type": "object",
      "properties": {
        "point": {
          "$ref": "#/$defs/Point"
        }
      }
    },
    "Point": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number",
          "format": "double"
        },
        "y": {
          "type": "number",
          "format": "double"
        },
        "z": {
          "type": "number",
          "format": "double"
        }
      }
    }
  }
}