Adrià Vilanova MartÃnez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame] | 1 | // Copyright 2020 The Chromium Authors |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | /* eslint-disable max-len */ |
| 6 | |
| 7 | /** |
| 8 | * The label of an issue. |
| 9 | * @typedef {Object} LabelValue |
| 10 | * @property {string} label - the string label. e.g. 'Target-99'. |
| 11 | * @property {string} derivation - How the label was derived. One of 'EXPLICIT', 'RULE'. |
| 12 | */ |
| 13 | |
| 14 | /** |
| 15 | * A user involved in an issue. |
| 16 | * @typedef {Object} UserValue |
| 17 | * @property {string} user - The User resource name. |
| 18 | * @property {string} derivation - How the user was derived. One of 'EXPLICIT', 'RULE'. |
| 19 | */ |
| 20 | |
| 21 | /** |
| 22 | * A component involved in an issue. |
| 23 | * @typedef {Object} ComponentValue |
| 24 | * @property {string} component - The ComponentDef resource name. |
| 25 | * @property {string} derivation - How the component was derived. One of 'EXPLICIT', 'RULE'. |
| 26 | */ |
| 27 | |
| 28 | /** |
| 29 | * A field involved in an issue. |
| 30 | * @typedef {Object} FieldValue |
| 31 | * @property {string} field - The FieldDef resource name. |
| 32 | * @property {string} value - The value associated with the field. |
| 33 | * @property {string} derivation - How the value was derived. One of 'EXPLICIT', 'RULE'. |
| 34 | * @property {string} phase - The phase of an issue that this value belongs to, if any. |
| 35 | */ |
| 36 | |
| 37 | /** |
| 38 | * The status of an issue. |
| 39 | * @typedef {Object} StatusValue |
| 40 | * @property {string} status - The status. e.g. 'Available'. |
| 41 | * @property {string} derivation - How the status was derived. One of 'EXPLICIT', 'RULE'. |
| 42 | */ |
| 43 | |
| 44 | /** |
| 45 | * A reference to monorail or external issue. |
| 46 | * @typedef {Object} IssueRef |
| 47 | * @property {string} [issue] - The resource name of the issue. |
| 48 | * @property {string} [extIdentifier] - The identifier of an external issue e.g 'b/123'. |
| 49 | */ |
| 50 | |
| 51 | /** |
| 52 | * An Issue. |
| 53 | * @typedef {Object} Issue |
| 54 | * @property {string} name - The resource name of the issue. |
| 55 | * @property {string} summary - The issue summary. |
| 56 | * @property {string} state - The current state of the issue. One of 'ACTIVE', 'DELETED', 'SPAM'. |
| 57 | * @property {string} reporter - The User resource name of the issue reporter. |
| 58 | * @property {UserValue} owner - The issue's owner. |
| 59 | * @property {StatusValue} status - The issue status. |
| 60 | * @property {IssueRef} mergedIntoIssueRef - The issue this issue is merged into. |
| 61 | * @property {Array<IssueRef>} blockedOnIssueRefs - TODO |
| 62 | * @property {Array<IssueRef>} blockingIssueRefs - TODO |
| 63 | * @property {Array<LabelValue>} labels - The labels of the issue. |
| 64 | * @property {Array<FieldValue>} fieldValues - TODO |
| 65 | * @property {Array<UserValue>} ccUsers - The users cc'd to this issue. |
| 66 | * @property {Array<ComponentValue>} components - The Components added to the issue. |
| 67 | * @property {Number} attachmentCount - The number of attachments this issue holds. |
| 68 | * @property {Number} starCount - The number of stars this issue has. |
| 69 | * @property {Array<FieldValue>} fieldValues - The field values of the issue. |
| 70 | * @property {Array<string>} phases - The names of all Phases in this issue. |
| 71 | * @property {Object} delta - Holds the pending changes that will be applied with SaveChanges(). |
| 72 | */ |
| 73 | // TODO(crbug.com/monorail/6456): createTime, closeTime, modifyTime, componentModifyTime, statusModifyTime, ownerModifyTime |
| 74 | |
| 75 | // TODO(crbug.com/monorail/6456): Add other classes. |