UNPKG

6.62 kBJavaScriptView Raw
1/*
2 * ---------------------------------------------------------
3 * Copyright(C) Microsoft Corporation. All rights reserved.
4 * ---------------------------------------------------------
5 *
6 * ---------------------------------------------------------
7 * Generated file, DO NOT EDIT
8 * ---------------------------------------------------------
9 */
10"use strict";
11Object.defineProperty(exports, "__esModule", { value: true });
12exports.TypeInfo = exports.CommentState = exports.CommentSortOrder = exports.CommentReactionType = exports.CommentMentionType = exports.CommentFormat = exports.CommentExpandOptions = void 0;
13/**
14 * Specifies the additional data retrieval options for comments.
15 */
16var CommentExpandOptions;
17(function (CommentExpandOptions) {
18 /**
19 * Include comments only, no mentions, reactions or rendered text
20 */
21 CommentExpandOptions[CommentExpandOptions["None"] = 0] = "None";
22 /**
23 * Include comment reactions
24 */
25 CommentExpandOptions[CommentExpandOptions["Reactions"] = 1] = "Reactions";
26 /**
27 * Include the rendered text (html) in addition to markdown text
28 */
29 CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText";
30 /**
31 * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes.
32 */
33 CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly";
34 /**
35 * If specified, then responses will be expanded in the results
36 */
37 CommentExpandOptions[CommentExpandOptions["Children"] = 32] = "Children";
38 /**
39 * Expand everything including Reactions, Mentions and also include RenderedText (HTML) for markdown comments
40 */
41 CommentExpandOptions[CommentExpandOptions["All"] = -17] = "All";
42})(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {}));
43/**
44 * Format of the comment. Ex. Markdown, Html.
45 */
46var CommentFormat;
47(function (CommentFormat) {
48 CommentFormat[CommentFormat["Markdown"] = 0] = "Markdown";
49 CommentFormat[CommentFormat["Html"] = 1] = "Html";
50})(CommentFormat = exports.CommentFormat || (exports.CommentFormat = {}));
51var CommentMentionType;
52(function (CommentMentionType) {
53 /**
54 * An identity was mentioned by using the format @{VSID}
55 */
56 CommentMentionType[CommentMentionType["Person"] = 0] = "Person";
57 /**
58 * A work item was mentioned by using the format #{Work Item ID}
59 */
60 CommentMentionType[CommentMentionType["WorkItem"] = 1] = "WorkItem";
61 /**
62 * A Pull Request was mentioned by using the format !{PR Number}
63 */
64 CommentMentionType[CommentMentionType["PullRequest"] = 2] = "PullRequest";
65})(CommentMentionType = exports.CommentMentionType || (exports.CommentMentionType = {}));
66/**
67 * Represents different reaction types for a comment
68 */
69var CommentReactionType;
70(function (CommentReactionType) {
71 CommentReactionType[CommentReactionType["Like"] = 0] = "Like";
72 CommentReactionType[CommentReactionType["Dislike"] = 1] = "Dislike";
73 CommentReactionType[CommentReactionType["Heart"] = 2] = "Heart";
74 CommentReactionType[CommentReactionType["Hooray"] = 3] = "Hooray";
75 CommentReactionType[CommentReactionType["Smile"] = 4] = "Smile";
76 CommentReactionType[CommentReactionType["Confused"] = 5] = "Confused";
77})(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {}));
78var CommentSortOrder;
79(function (CommentSortOrder) {
80 /**
81 * The results will be sorted in Ascending order.
82 */
83 CommentSortOrder[CommentSortOrder["Asc"] = 1] = "Asc";
84 /**
85 * The results will be sorted in Descending order.
86 */
87 CommentSortOrder[CommentSortOrder["Desc"] = 2] = "Desc";
88})(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {}));
89/**
90 * Represents the possible comment states.
91 */
92var CommentState;
93(function (CommentState) {
94 CommentState[CommentState["Active"] = 0] = "Active";
95 CommentState[CommentState["Resolved"] = 1] = "Resolved";
96 CommentState[CommentState["Closed"] = 2] = "Closed";
97})(CommentState = exports.CommentState || (exports.CommentState = {}));
98exports.TypeInfo = {
99 Comment: {},
100 CommentAttachment: {},
101 CommentExpandOptions: {
102 enumValues: {
103 "none": 0,
104 "reactions": 1,
105 "renderedText": 8,
106 "renderedTextOnly": 16,
107 "children": 32,
108 "all": -17
109 }
110 },
111 CommentFormat: {
112 enumValues: {
113 "markdown": 0,
114 "html": 1
115 }
116 },
117 CommentList: {},
118 CommentMention: {},
119 CommentMentionType: {
120 enumValues: {
121 "person": 0,
122 "workItem": 1,
123 "pullRequest": 2
124 }
125 },
126 CommentReaction: {},
127 CommentReactionType: {
128 enumValues: {
129 "like": 0,
130 "dislike": 1,
131 "heart": 2,
132 "hooray": 3,
133 "smile": 4,
134 "confused": 5
135 }
136 },
137 CommentSortOrder: {
138 enumValues: {
139 "asc": 1,
140 "desc": 2
141 }
142 },
143 CommentState: {
144 enumValues: {
145 "active": 0,
146 "resolved": 1,
147 "closed": 2
148 }
149 },
150 CommentUpdateParameters: {},
151 CommentVersion: {},
152};
153exports.TypeInfo.Comment.fields = {
154 createdDate: {
155 isDate: true,
156 },
157 mentions: {
158 isArray: true,
159 typeInfo: exports.TypeInfo.CommentMention
160 },
161 modifiedDate: {
162 isDate: true,
163 },
164 reactions: {
165 isArray: true,
166 typeInfo: exports.TypeInfo.CommentReaction
167 },
168 replies: {
169 typeInfo: exports.TypeInfo.CommentList
170 },
171 state: {
172 enumType: exports.TypeInfo.CommentState
173 }
174};
175exports.TypeInfo.CommentAttachment.fields = {
176 createdDate: {
177 isDate: true,
178 }
179};
180exports.TypeInfo.CommentList.fields = {
181 comments: {
182 isArray: true,
183 typeInfo: exports.TypeInfo.Comment
184 }
185};
186exports.TypeInfo.CommentMention.fields = {
187 type: {
188 enumType: exports.TypeInfo.CommentMentionType
189 }
190};
191exports.TypeInfo.CommentReaction.fields = {
192 type: {
193 enumType: exports.TypeInfo.CommentReactionType
194 }
195};
196exports.TypeInfo.CommentUpdateParameters.fields = {
197 state: {
198 enumType: exports.TypeInfo.CommentState
199 }
200};
201exports.TypeInfo.CommentVersion.fields = {
202 createdDate: {
203 isDate: true,
204 },
205 modifiedDate: {
206 isDate: true,
207 },
208 state: {
209 enumType: exports.TypeInfo.CommentState
210 }
211};