UNPKG

20.2 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.WorkItemTypeClass = exports.RuleConditionType = exports.RuleActionType = exports.ProcessWorkItemTypeFieldsExpandLevel = exports.ProcessClass = exports.PageType = exports.GetWorkItemTypeExpand = exports.GetProcessExpandLevel = exports.GetBehaviorsExpand = exports.FieldType = exports.CustomizationType = void 0;
13/**
14 * Indicates the customization-type. Customization-type is System if is system generated or by default. Customization-type is Inherited if the existing workitemtype of inherited process is customized. Customization-type is Custom if the newly created workitemtype is customized.
15 */
16var CustomizationType;
17(function (CustomizationType) {
18 /**
19 * Customization-type is System if is system generated workitemtype.
20 */
21 CustomizationType[CustomizationType["System"] = 1] = "System";
22 /**
23 * Customization-type is Inherited if the existing workitemtype of inherited process is customized.
24 */
25 CustomizationType[CustomizationType["Inherited"] = 2] = "Inherited";
26 /**
27 * Customization-type is Custom if the newly created workitemtype is customized.
28 */
29 CustomizationType[CustomizationType["Custom"] = 3] = "Custom";
30})(CustomizationType = exports.CustomizationType || (exports.CustomizationType = {}));
31/**
32 * Enum for the type of a field.
33 */
34var FieldType;
35(function (FieldType) {
36 /**
37 * String field type.
38 */
39 FieldType[FieldType["String"] = 1] = "String";
40 /**
41 * Integer field type.
42 */
43 FieldType[FieldType["Integer"] = 2] = "Integer";
44 /**
45 * DateTime field type.
46 */
47 FieldType[FieldType["DateTime"] = 3] = "DateTime";
48 /**
49 * Plain text field type.
50 */
51 FieldType[FieldType["PlainText"] = 5] = "PlainText";
52 /**
53 * HTML (Multiline) field type.
54 */
55 FieldType[FieldType["Html"] = 7] = "Html";
56 /**
57 * Treepath field type.
58 */
59 FieldType[FieldType["TreePath"] = 8] = "TreePath";
60 /**
61 * History field type.
62 */
63 FieldType[FieldType["History"] = 9] = "History";
64 /**
65 * Double field type.
66 */
67 FieldType[FieldType["Double"] = 10] = "Double";
68 /**
69 * Guid field type.
70 */
71 FieldType[FieldType["Guid"] = 11] = "Guid";
72 /**
73 * Boolean field type.
74 */
75 FieldType[FieldType["Boolean"] = 12] = "Boolean";
76 /**
77 * Identity field type.
78 */
79 FieldType[FieldType["Identity"] = 13] = "Identity";
80 /**
81 * Integer picklist field type.
82 */
83 FieldType[FieldType["PicklistInteger"] = 14] = "PicklistInteger";
84 /**
85 * String picklist field type.
86 */
87 FieldType[FieldType["PicklistString"] = 15] = "PicklistString";
88 /**
89 * Double picklist field type.
90 */
91 FieldType[FieldType["PicklistDouble"] = 16] = "PicklistDouble";
92})(FieldType = exports.FieldType || (exports.FieldType = {}));
93/**
94 * Expand options to fetch fields for behaviors API.
95 */
96var GetBehaviorsExpand;
97(function (GetBehaviorsExpand) {
98 /**
99 * Default none option.
100 */
101 GetBehaviorsExpand[GetBehaviorsExpand["None"] = 0] = "None";
102 /**
103 * This option returns fields associated with a behavior.
104 */
105 GetBehaviorsExpand[GetBehaviorsExpand["Fields"] = 1] = "Fields";
106 /**
107 * This option returns fields associated with this behavior and all behaviors from which it inherits.
108 */
109 GetBehaviorsExpand[GetBehaviorsExpand["CombinedFields"] = 2] = "CombinedFields";
110})(GetBehaviorsExpand = exports.GetBehaviorsExpand || (exports.GetBehaviorsExpand = {}));
111/**
112 * The expand level of returned processes.
113 */
114var GetProcessExpandLevel;
115(function (GetProcessExpandLevel) {
116 /**
117 * No expand level.
118 */
119 GetProcessExpandLevel[GetProcessExpandLevel["None"] = 0] = "None";
120 /**
121 * Projects expand level.
122 */
123 GetProcessExpandLevel[GetProcessExpandLevel["Projects"] = 1] = "Projects";
124})(GetProcessExpandLevel = exports.GetProcessExpandLevel || (exports.GetProcessExpandLevel = {}));
125/**
126 * Flag to define what properties to return in get work item type response.
127 */
128var GetWorkItemTypeExpand;
129(function (GetWorkItemTypeExpand) {
130 /**
131 * Returns no properties in get work item type response.
132 */
133 GetWorkItemTypeExpand[GetWorkItemTypeExpand["None"] = 0] = "None";
134 /**
135 * Returns states property in get work item type response.
136 */
137 GetWorkItemTypeExpand[GetWorkItemTypeExpand["States"] = 1] = "States";
138 /**
139 * Returns behaviors property in get work item type response.
140 */
141 GetWorkItemTypeExpand[GetWorkItemTypeExpand["Behaviors"] = 2] = "Behaviors";
142 /**
143 * Returns layout property in get work item type response.
144 */
145 GetWorkItemTypeExpand[GetWorkItemTypeExpand["Layout"] = 4] = "Layout";
146})(GetWorkItemTypeExpand = exports.GetWorkItemTypeExpand || (exports.GetWorkItemTypeExpand = {}));
147/**
148 * Enum for the types of pages in the work item form layout
149 */
150var PageType;
151(function (PageType) {
152 /**
153 * Custom page type.
154 */
155 PageType[PageType["Custom"] = 1] = "Custom";
156 /**
157 * History page type.
158 */
159 PageType[PageType["History"] = 2] = "History";
160 /**
161 * Link page type.
162 */
163 PageType[PageType["Links"] = 3] = "Links";
164 /**
165 * Attachment page type.
166 */
167 PageType[PageType["Attachments"] = 4] = "Attachments";
168})(PageType = exports.PageType || (exports.PageType = {}));
169var ProcessClass;
170(function (ProcessClass) {
171 ProcessClass[ProcessClass["System"] = 0] = "System";
172 ProcessClass[ProcessClass["Derived"] = 1] = "Derived";
173 ProcessClass[ProcessClass["Custom"] = 2] = "Custom";
174})(ProcessClass = exports.ProcessClass || (exports.ProcessClass = {}));
175/**
176 * Expand options for the work item field(s) request.
177 */
178var ProcessWorkItemTypeFieldsExpandLevel;
179(function (ProcessWorkItemTypeFieldsExpandLevel) {
180 /**
181 * Includes only basic properties of the field.
182 */
183 ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["None"] = 0] = "None";
184 /**
185 * Includes allowed values for the field.
186 */
187 ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["AllowedValues"] = 1] = "AllowedValues";
188 /**
189 * Includes allowed values and dependent fields of the field.
190 */
191 ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["All"] = 2] = "All";
192})(ProcessWorkItemTypeFieldsExpandLevel = exports.ProcessWorkItemTypeFieldsExpandLevel || (exports.ProcessWorkItemTypeFieldsExpandLevel = {}));
193/**
194 * Type of action to take when the rule is triggered.
195 */
196var RuleActionType;
197(function (RuleActionType) {
198 /**
199 * Make the target field required. Example : {"actionType":"$makeRequired","targetField":"Microsoft.VSTS.Common.Activity","value":""}
200 */
201 RuleActionType[RuleActionType["MakeRequired"] = 1] = "MakeRequired";
202 /**
203 * Make the target field read-only. Example : {"actionType":"$makeReadOnly","targetField":"Microsoft.VSTS.Common.Activity","value":""}
204 */
205 RuleActionType[RuleActionType["MakeReadOnly"] = 2] = "MakeReadOnly";
206 /**
207 * Set a default value on the target field. This is used if the user creates a integer/string field and sets a default value of this field.
208 */
209 RuleActionType[RuleActionType["SetDefaultValue"] = 3] = "SetDefaultValue";
210 /**
211 * Set the default value on the target field from server clock. This is used if user creates the field like Date/Time and uses default value.
212 */
213 RuleActionType[RuleActionType["SetDefaultFromClock"] = 4] = "SetDefaultFromClock";
214 /**
215 * Set the default current user value on the target field. This is used if the user creates the field of type identity and uses default value.
216 */
217 RuleActionType[RuleActionType["SetDefaultFromCurrentUser"] = 5] = "SetDefaultFromCurrentUser";
218 /**
219 * Set the default value on from existing field to the target field. This used wants to set a existing field value to the current field.
220 */
221 RuleActionType[RuleActionType["SetDefaultFromField"] = 6] = "SetDefaultFromField";
222 /**
223 * Set the value of target field to given value. Example : {actionType: "$copyValue", targetField: "ScrumInherited.mypicklist", value: "samplevalue"}
224 */
225 RuleActionType[RuleActionType["CopyValue"] = 7] = "CopyValue";
226 /**
227 * Set the value from clock.
228 */
229 RuleActionType[RuleActionType["CopyFromClock"] = 8] = "CopyFromClock";
230 /**
231 * Set the current user to the target field. Example : {"actionType":"$copyFromCurrentUser","targetField":"System.AssignedTo","value":""}.
232 */
233 RuleActionType[RuleActionType["CopyFromCurrentUser"] = 9] = "CopyFromCurrentUser";
234 /**
235 * Copy the value from a specified field and set to target field. Example : {actionType: "$copyFromField", targetField: "System.AssignedTo", value:"System.ChangedBy"}. Here, value is copied from "System.ChangedBy" and set to "System.AssingedTo" field.
236 */
237 RuleActionType[RuleActionType["CopyFromField"] = 10] = "CopyFromField";
238 /**
239 * Set the value of the target field to empty.
240 */
241 RuleActionType[RuleActionType["SetValueToEmpty"] = 11] = "SetValueToEmpty";
242 /**
243 * Use the current time to set the value of the target field. Example : {actionType: "$copyFromServerClock", targetField: "System.CreatedDate", value: ""}
244 */
245 RuleActionType[RuleActionType["CopyFromServerClock"] = 12] = "CopyFromServerClock";
246 /**
247 * Use the current user to set the value of the target field.
248 */
249 RuleActionType[RuleActionType["CopyFromServerCurrentUser"] = 13] = "CopyFromServerCurrentUser";
250 /**
251 * Hides target field from the form. This is a server side only action.
252 */
253 RuleActionType[RuleActionType["HideTargetField"] = 14] = "HideTargetField";
254 /**
255 * Disallows a field from being set to a specific value.
256 */
257 RuleActionType[RuleActionType["DisallowValue"] = 15] = "DisallowValue";
258})(RuleActionType = exports.RuleActionType || (exports.RuleActionType = {}));
259/**
260 * Type of rule condition.
261 */
262var RuleConditionType;
263(function (RuleConditionType) {
264 /**
265 * $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value.
266 */
267 RuleConditionType[RuleConditionType["When"] = 1] = "When";
268 /**
269 * $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value.
270 */
271 RuleConditionType[RuleConditionType["WhenNot"] = 2] = "WhenNot";
272 /**
273 * $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field.
274 */
275 RuleConditionType[RuleConditionType["WhenChanged"] = 3] = "WhenChanged";
276 /**
277 * $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field.
278 */
279 RuleConditionType[RuleConditionType["WhenNotChanged"] = 4] = "WhenNotChanged";
280 /**
281 * $WhenWas. This condition limits the execution of its children to cases when another field value is changed from one value to another. e.g. If the condition is : When the work item state changes from New to Approved, here $WhenWas clause defines the "New" state of the workitem and $When clause defines "Approved" state.
282 */
283 RuleConditionType[RuleConditionType["WhenWas"] = 5] = "WhenWas";
284 RuleConditionType[RuleConditionType["WhenStateChangedTo"] = 6] = "WhenStateChangedTo";
285 RuleConditionType[RuleConditionType["WhenStateChangedFromAndTo"] = 7] = "WhenStateChangedFromAndTo";
286 RuleConditionType[RuleConditionType["WhenWorkItemIsCreated"] = 8] = "WhenWorkItemIsCreated";
287 RuleConditionType[RuleConditionType["WhenValueIsDefined"] = 9] = "WhenValueIsDefined";
288 RuleConditionType[RuleConditionType["WhenValueIsNotDefined"] = 10] = "WhenValueIsNotDefined";
289 /**
290 * This condition checks if current user is member of a particular group. This condition does not have any 1:1 mapping with any server side rule condition, rather this is a dummy condition added for customer simplicity of understanding. This condition is later translated to a FOR membership filter . e.g. If the condition is : WhenCurrentUserIsMemberOfGroup "Approvers" then "MakeRequired" Field1.Here it translates to a For rule , "MakeRequired" for "Approvers"
291 */
292 RuleConditionType[RuleConditionType["WhenCurrentUserIsMemberOfGroup"] = 11] = "WhenCurrentUserIsMemberOfGroup";
293 /**
294 * This condition checks if current user is not member of a particular group. This condition does not have any 1:1 mapping with any server side rule condition, rather this is a dummy condition added for customer simplicity of understanding. This condition is later translated to a NOT membership filter . e.g. If the condition is : WhenCurrentUserIsNotMemberOfGroup "Approvers" then "MakeRequired" Field1.Here it translates to a Not rule , "MakeRequired" not "Approvers"
295 */
296 RuleConditionType[RuleConditionType["WhenCurrentUserIsNotMemberOfGroup"] = 12] = "WhenCurrentUserIsNotMemberOfGroup";
297})(RuleConditionType = exports.RuleConditionType || (exports.RuleConditionType = {}));
298var WorkItemTypeClass;
299(function (WorkItemTypeClass) {
300 WorkItemTypeClass[WorkItemTypeClass["System"] = 0] = "System";
301 WorkItemTypeClass[WorkItemTypeClass["Derived"] = 1] = "Derived";
302 WorkItemTypeClass[WorkItemTypeClass["Custom"] = 2] = "Custom";
303})(WorkItemTypeClass = exports.WorkItemTypeClass || (exports.WorkItemTypeClass = {}));
304exports.TypeInfo = {
305 CreateProcessRuleRequest: {},
306 CustomizationType: {
307 enumValues: {
308 "system": 1,
309 "inherited": 2,
310 "custom": 3
311 }
312 },
313 FieldModel: {},
314 FieldType: {
315 enumValues: {
316 "string": 1,
317 "integer": 2,
318 "dateTime": 3,
319 "plainText": 5,
320 "html": 7,
321 "treePath": 8,
322 "history": 9,
323 "double": 10,
324 "guid": 11,
325 "boolean": 12,
326 "identity": 13,
327 "picklistInteger": 14,
328 "picklistString": 15,
329 "picklistDouble": 16
330 }
331 },
332 FormLayout: {},
333 GetBehaviorsExpand: {
334 enumValues: {
335 "none": 0,
336 "fields": 1,
337 "combinedFields": 2
338 }
339 },
340 GetProcessExpandLevel: {
341 enumValues: {
342 "none": 0,
343 "projects": 1
344 }
345 },
346 GetWorkItemTypeExpand: {
347 enumValues: {
348 "none": 0,
349 "states": 1,
350 "behaviors": 2,
351 "layout": 4
352 }
353 },
354 Page: {},
355 PageType: {
356 enumValues: {
357 "custom": 1,
358 "history": 2,
359 "links": 3,
360 "attachments": 4
361 }
362 },
363 ProcessBehavior: {},
364 ProcessClass: {
365 enumValues: {
366 "system": 0,
367 "derived": 1,
368 "custom": 2
369 }
370 },
371 ProcessInfo: {},
372 ProcessModel: {},
373 ProcessProperties: {},
374 ProcessRule: {},
375 ProcessWorkItemType: {},
376 ProcessWorkItemTypeField: {},
377 ProcessWorkItemTypeFieldsExpandLevel: {
378 enumValues: {
379 "none": 0,
380 "allowedValues": 1,
381 "all": 2
382 }
383 },
384 RuleAction: {},
385 RuleActionType: {
386 enumValues: {
387 "makeRequired": 1,
388 "makeReadOnly": 2,
389 "setDefaultValue": 3,
390 "setDefaultFromClock": 4,
391 "setDefaultFromCurrentUser": 5,
392 "setDefaultFromField": 6,
393 "copyValue": 7,
394 "copyFromClock": 8,
395 "copyFromCurrentUser": 9,
396 "copyFromField": 10,
397 "setValueToEmpty": 11,
398 "copyFromServerClock": 12,
399 "copyFromServerCurrentUser": 13,
400 "hideTargetField": 14,
401 "disallowValue": 15
402 }
403 },
404 RuleCondition: {},
405 RuleConditionType: {
406 enumValues: {
407 "when": 1,
408 "whenNot": 2,
409 "whenChanged": 3,
410 "whenNotChanged": 4,
411 "whenWas": 5,
412 "whenStateChangedTo": 6,
413 "whenStateChangedFromAndTo": 7,
414 "whenWorkItemIsCreated": 8,
415 "whenValueIsDefined": 9,
416 "whenValueIsNotDefined": 10,
417 "whenCurrentUserIsMemberOfGroup": 11,
418 "whenCurrentUserIsNotMemberOfGroup": 12
419 }
420 },
421 UpdateProcessRuleRequest: {},
422 WorkItemStateResultModel: {},
423 WorkItemTypeClass: {
424 enumValues: {
425 "system": 0,
426 "derived": 1,
427 "custom": 2
428 }
429 },
430 WorkItemTypeModel: {},
431};
432exports.TypeInfo.CreateProcessRuleRequest.fields = {
433 actions: {
434 isArray: true,
435 typeInfo: exports.TypeInfo.RuleAction
436 },
437 conditions: {
438 isArray: true,
439 typeInfo: exports.TypeInfo.RuleCondition
440 }
441};
442exports.TypeInfo.FieldModel.fields = {
443 type: {
444 enumType: exports.TypeInfo.FieldType
445 }
446};
447exports.TypeInfo.FormLayout.fields = {
448 pages: {
449 isArray: true,
450 typeInfo: exports.TypeInfo.Page
451 }
452};
453exports.TypeInfo.Page.fields = {
454 pageType: {
455 enumType: exports.TypeInfo.PageType
456 }
457};
458exports.TypeInfo.ProcessBehavior.fields = {
459 customization: {
460 enumType: exports.TypeInfo.CustomizationType
461 }
462};
463exports.TypeInfo.ProcessInfo.fields = {
464 customizationType: {
465 enumType: exports.TypeInfo.CustomizationType
466 }
467};
468exports.TypeInfo.ProcessModel.fields = {
469 properties: {
470 typeInfo: exports.TypeInfo.ProcessProperties
471 }
472};
473exports.TypeInfo.ProcessProperties.fields = {
474 class: {
475 enumType: exports.TypeInfo.ProcessClass
476 }
477};
478exports.TypeInfo.ProcessRule.fields = {
479 actions: {
480 isArray: true,
481 typeInfo: exports.TypeInfo.RuleAction
482 },
483 conditions: {
484 isArray: true,
485 typeInfo: exports.TypeInfo.RuleCondition
486 },
487 customizationType: {
488 enumType: exports.TypeInfo.CustomizationType
489 }
490};
491exports.TypeInfo.ProcessWorkItemType.fields = {
492 customization: {
493 enumType: exports.TypeInfo.CustomizationType
494 },
495 layout: {
496 typeInfo: exports.TypeInfo.FormLayout
497 },
498 states: {
499 isArray: true,
500 typeInfo: exports.TypeInfo.WorkItemStateResultModel
501 }
502};
503exports.TypeInfo.ProcessWorkItemTypeField.fields = {
504 customization: {
505 enumType: exports.TypeInfo.CustomizationType
506 },
507 type: {
508 enumType: exports.TypeInfo.FieldType
509 }
510};
511exports.TypeInfo.RuleAction.fields = {
512 actionType: {
513 enumType: exports.TypeInfo.RuleActionType
514 }
515};
516exports.TypeInfo.RuleCondition.fields = {
517 conditionType: {
518 enumType: exports.TypeInfo.RuleConditionType
519 }
520};
521exports.TypeInfo.UpdateProcessRuleRequest.fields = {
522 actions: {
523 isArray: true,
524 typeInfo: exports.TypeInfo.RuleAction
525 },
526 conditions: {
527 isArray: true,
528 typeInfo: exports.TypeInfo.RuleCondition
529 }
530};
531exports.TypeInfo.WorkItemStateResultModel.fields = {
532 customizationType: {
533 enumType: exports.TypeInfo.CustomizationType
534 }
535};
536exports.TypeInfo.WorkItemTypeModel.fields = {
537 class: {
538 enumType: exports.TypeInfo.WorkItemTypeClass
539 },
540 layout: {
541 typeInfo: exports.TypeInfo.FormLayout
542 },
543 states: {
544 isArray: true,
545 typeInfo: exports.TypeInfo.WorkItemStateResultModel
546 }
547};