1 | /**
|
2 | * Class that describes a request to add a field in a work item type.
|
3 | */
|
4 | export interface AddProcessWorkItemTypeFieldRequest {
|
5 | /**
|
6 | * The list of field allowed values.
|
7 | */
|
8 | allowedValues?: string[];
|
9 | /**
|
10 | * Allow setting field value to a group identity. Only applies to identity fields.
|
11 | */
|
12 | allowGroups?: boolean;
|
13 | /**
|
14 | * The default value of the field.
|
15 | */
|
16 | defaultValue?: any;
|
17 | /**
|
18 | * If true the field cannot be edited.
|
19 | */
|
20 | readOnly?: boolean;
|
21 | /**
|
22 | * Reference name of the field.
|
23 | */
|
24 | referenceName?: string;
|
25 | /**
|
26 | * If true the field cannot be empty.
|
27 | */
|
28 | required?: boolean;
|
29 | }
|
30 | /**
|
31 | * Represent a control in the form.
|
32 | */
|
33 | export interface Control {
|
34 | /**
|
35 | * Contribution for the control.
|
36 | */
|
37 | contribution?: WitContribution;
|
38 | /**
|
39 | * Type of the control.
|
40 | */
|
41 | controlType?: string;
|
42 | /**
|
43 | * Height of the control, for html controls.
|
44 | */
|
45 | height?: number;
|
46 | /**
|
47 | * The id for the layout node.
|
48 | */
|
49 | id?: string;
|
50 | /**
|
51 | * A value indicating whether this layout node has been inherited. from a parent layout. This is expected to only be only set by the combiner.
|
52 | */
|
53 | inherited?: boolean;
|
54 | /**
|
55 | * A value indicating if the layout node is contribution or not.
|
56 | */
|
57 | isContribution?: boolean;
|
58 | /**
|
59 | * Label for the field.
|
60 | */
|
61 | label?: string;
|
62 | /**
|
63 | * Inner text of the control.
|
64 | */
|
65 | metadata?: string;
|
66 | /**
|
67 | * Order in which the control should appear in its group.
|
68 | */
|
69 | order?: number;
|
70 | /**
|
71 | * A value indicating whether this layout node has been overridden . by a child layout.
|
72 | */
|
73 | overridden?: boolean;
|
74 | /**
|
75 | * A value indicating if the control is readonly.
|
76 | */
|
77 | readOnly?: boolean;
|
78 | /**
|
79 | * A value indicating if the control should be hidden or not.
|
80 | */
|
81 | visible?: boolean;
|
82 | /**
|
83 | * Watermark text for the textbox.
|
84 | */
|
85 | watermark?: string;
|
86 | }
|
87 | /**
|
88 | * Describes a process being created.
|
89 | */
|
90 | export interface CreateProcessModel {
|
91 | /**
|
92 | * Description of the process
|
93 | */
|
94 | description?: string;
|
95 | /**
|
96 | * Name of the process
|
97 | */
|
98 | name?: string;
|
99 | /**
|
100 | * The ID of the parent process
|
101 | */
|
102 | parentProcessTypeId?: string;
|
103 | /**
|
104 | * Reference name of process being created. If not specified, server will assign a unique reference name
|
105 | */
|
106 | referenceName?: string;
|
107 | }
|
108 | /**
|
109 | * Request object/class for creating a rule on a work item type.
|
110 | */
|
111 | export interface CreateProcessRuleRequest {
|
112 | /**
|
113 | * List of actions to take when the rule is triggered.
|
114 | */
|
115 | actions?: RuleAction[];
|
116 | /**
|
117 | * List of conditions when the rule should be triggered.
|
118 | */
|
119 | conditions?: RuleCondition[];
|
120 | /**
|
121 | * Indicates if the rule is disabled.
|
122 | */
|
123 | isDisabled?: boolean;
|
124 | /**
|
125 | * Name for the rule.
|
126 | */
|
127 | name?: string;
|
128 | }
|
129 | /**
|
130 | * Class for create work item type request
|
131 | */
|
132 | export interface CreateProcessWorkItemTypeRequest {
|
133 | /**
|
134 | * Color hexadecimal code to represent the work item type
|
135 | */
|
136 | color?: string;
|
137 | /**
|
138 | * Description of the work item type
|
139 | */
|
140 | description?: string;
|
141 | /**
|
142 | * Icon to represent the work item type
|
143 | */
|
144 | icon?: string;
|
145 | /**
|
146 | * Parent work item type for work item type
|
147 | */
|
148 | inheritsFrom?: string;
|
149 | /**
|
150 | * True if the work item type need to be disabled
|
151 | */
|
152 | isDisabled?: boolean;
|
153 | /**
|
154 | * Name of work item type
|
155 | */
|
156 | name?: string;
|
157 | }
|
158 | /**
|
159 | * 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.
|
160 | */
|
161 | export declare enum CustomizationType {
|
162 | /**
|
163 | * Customization-type is System if is system generated workitemtype.
|
164 | */
|
165 | System = 1,
|
166 | /**
|
167 | * Customization-type is Inherited if the existing workitemtype of inherited process is customized.
|
168 | */
|
169 | Inherited = 2,
|
170 | /**
|
171 | * Customization-type is Custom if the newly created workitemtype is customized.
|
172 | */
|
173 | Custom = 3
|
174 | }
|
175 | /**
|
176 | * Represents the extensions part of the layout
|
177 | */
|
178 | export interface Extension {
|
179 | /**
|
180 | * Id of the extension
|
181 | */
|
182 | id?: string;
|
183 | }
|
184 | export interface FieldModel {
|
185 | description?: string;
|
186 | id?: string;
|
187 | isIdentity?: boolean;
|
188 | isLocked?: boolean;
|
189 | name?: string;
|
190 | type?: FieldType;
|
191 | url?: string;
|
192 | }
|
193 | export interface FieldRuleModel {
|
194 | actions?: RuleActionModel[];
|
195 | conditions?: RuleConditionModel[];
|
196 | friendlyName?: string;
|
197 | id?: string;
|
198 | isDisabled?: boolean;
|
199 | isSystem?: boolean;
|
200 | }
|
201 | /**
|
202 | * Enum for the type of a field.
|
203 | */
|
204 | export declare enum FieldType {
|
205 | /**
|
206 | * String field type.
|
207 | */
|
208 | String = 1,
|
209 | /**
|
210 | * Integer field type.
|
211 | */
|
212 | Integer = 2,
|
213 | /**
|
214 | * DateTime field type.
|
215 | */
|
216 | DateTime = 3,
|
217 | /**
|
218 | * Plain text field type.
|
219 | */
|
220 | PlainText = 5,
|
221 | /**
|
222 | * HTML (Multiline) field type.
|
223 | */
|
224 | Html = 7,
|
225 | /**
|
226 | * Treepath field type.
|
227 | */
|
228 | TreePath = 8,
|
229 | /**
|
230 | * History field type.
|
231 | */
|
232 | History = 9,
|
233 | /**
|
234 | * Double field type.
|
235 | */
|
236 | Double = 10,
|
237 | /**
|
238 | * Guid field type.
|
239 | */
|
240 | Guid = 11,
|
241 | /**
|
242 | * Boolean field type.
|
243 | */
|
244 | Boolean = 12,
|
245 | /**
|
246 | * Identity field type.
|
247 | */
|
248 | Identity = 13,
|
249 | /**
|
250 | * Integer picklist field type.
|
251 | */
|
252 | PicklistInteger = 14,
|
253 | /**
|
254 | * String picklist field type.
|
255 | */
|
256 | PicklistString = 15,
|
257 | /**
|
258 | * Double picklist field type.
|
259 | */
|
260 | PicklistDouble = 16
|
261 | }
|
262 | /**
|
263 | * Describes the layout of a work item type
|
264 | */
|
265 | export interface FormLayout {
|
266 | /**
|
267 | * Gets and sets extensions list.
|
268 | */
|
269 | extensions?: Extension[];
|
270 | /**
|
271 | * Top level tabs of the layout.
|
272 | */
|
273 | pages?: Page[];
|
274 | /**
|
275 | * Headers controls of the layout.
|
276 | */
|
277 | systemControls?: Control[];
|
278 | }
|
279 | /**
|
280 | * Expand options to fetch fields for behaviors API.
|
281 | */
|
282 | export declare enum GetBehaviorsExpand {
|
283 | /**
|
284 | * Default none option.
|
285 | */
|
286 | None = 0,
|
287 | /**
|
288 | * This option returns fields associated with a behavior.
|
289 | */
|
290 | Fields = 1,
|
291 | /**
|
292 | * This option returns fields associated with this behavior and all behaviors from which it inherits.
|
293 | */
|
294 | CombinedFields = 2
|
295 | }
|
296 | /**
|
297 | * The expand level of returned processes.
|
298 | */
|
299 | export declare enum GetProcessExpandLevel {
|
300 | /**
|
301 | * No expand level.
|
302 | */
|
303 | None = 0,
|
304 | /**
|
305 | * Projects expand level.
|
306 | */
|
307 | Projects = 1
|
308 | }
|
309 | /**
|
310 | * Flag to define what properties to return in get work item type response.
|
311 | */
|
312 | export declare enum GetWorkItemTypeExpand {
|
313 | /**
|
314 | * Returns no properties in get work item type response.
|
315 | */
|
316 | None = 0,
|
317 | /**
|
318 | * Returns states property in get work item type response.
|
319 | */
|
320 | States = 1,
|
321 | /**
|
322 | * Returns behaviors property in get work item type response.
|
323 | */
|
324 | Behaviors = 2,
|
325 | /**
|
326 | * Returns layout property in get work item type response.
|
327 | */
|
328 | Layout = 4
|
329 | }
|
330 | /**
|
331 | * Represent a group in the form that holds controls in it.
|
332 | */
|
333 | export interface Group {
|
334 | /**
|
335 | * Contribution for the group.
|
336 | */
|
337 | contribution?: WitContribution;
|
338 | /**
|
339 | * Controls to be put in the group.
|
340 | */
|
341 | controls?: Control[];
|
342 | /**
|
343 | * The height for the contribution.
|
344 | */
|
345 | height?: number;
|
346 | /**
|
347 | * The id for the layout node.
|
348 | */
|
349 | id?: string;
|
350 | /**
|
351 | * A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner.
|
352 | */
|
353 | inherited?: boolean;
|
354 | /**
|
355 | * A value indicating if the layout node is contribution are not.
|
356 | */
|
357 | isContribution?: boolean;
|
358 | /**
|
359 | * Label for the group.
|
360 | */
|
361 | label?: string;
|
362 | /**
|
363 | * Order in which the group should appear in the section.
|
364 | */
|
365 | order?: number;
|
366 | /**
|
367 | * A value indicating whether this layout node has been overridden by a child layout.
|
368 | */
|
369 | overridden?: boolean;
|
370 | /**
|
371 | * A value indicating if the group should be hidden or not.
|
372 | */
|
373 | visible?: boolean;
|
374 | }
|
375 | /**
|
376 | * Class that describes the work item state is hidden.
|
377 | */
|
378 | export interface HideStateModel {
|
379 | /**
|
380 | * Returns 'true', if workitem state is hidden, 'false' otherwise.
|
381 | */
|
382 | hidden?: boolean;
|
383 | }
|
384 | /**
|
385 | * Describes a page in the work item form layout
|
386 | */
|
387 | export interface Page {
|
388 | /**
|
389 | * Contribution for the page.
|
390 | */
|
391 | contribution?: WitContribution;
|
392 | /**
|
393 | * The id for the layout node.
|
394 | */
|
395 | id?: string;
|
396 | /**
|
397 | * A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner.
|
398 | */
|
399 | inherited?: boolean;
|
400 | /**
|
401 | * A value indicating if the layout node is contribution are not.
|
402 | */
|
403 | isContribution?: boolean;
|
404 | /**
|
405 | * The label for the page.
|
406 | */
|
407 | label?: string;
|
408 | /**
|
409 | * A value indicating whether any user operations are permitted on this page and the contents of this page
|
410 | */
|
411 | locked?: boolean;
|
412 | /**
|
413 | * Order in which the page should appear in the layout.
|
414 | */
|
415 | order?: number;
|
416 | /**
|
417 | * A value indicating whether this layout node has been overridden by a child layout.
|
418 | */
|
419 | overridden?: boolean;
|
420 | /**
|
421 | * The icon for the page.
|
422 | */
|
423 | pageType?: PageType;
|
424 | /**
|
425 | * The sections of the page.
|
426 | */
|
427 | sections?: Section[];
|
428 | /**
|
429 | * A value indicating if the page should be hidden or not.
|
430 | */
|
431 | visible?: boolean;
|
432 | }
|
433 | /**
|
434 | * Enum for the types of pages in the work item form layout
|
435 | */
|
436 | export declare enum PageType {
|
437 | /**
|
438 | * Custom page type.
|
439 | */
|
440 | Custom = 1,
|
441 | /**
|
442 | * History page type.
|
443 | */
|
444 | History = 2,
|
445 | /**
|
446 | * Link page type.
|
447 | */
|
448 | Links = 3,
|
449 | /**
|
450 | * Attachment page type.
|
451 | */
|
452 | Attachments = 4
|
453 | }
|
454 | /**
|
455 | * Picklist.
|
456 | */
|
457 | export interface PickList extends PickListMetadata {
|
458 | /**
|
459 | * A list of PicklistItemModel.
|
460 | */
|
461 | items?: string[];
|
462 | }
|
463 | /**
|
464 | * Metadata for picklist.
|
465 | */
|
466 | export interface PickListMetadata {
|
467 | /**
|
468 | * ID of the picklist
|
469 | */
|
470 | id?: string;
|
471 | /**
|
472 | * Indicates whether items outside of suggested list are allowed
|
473 | */
|
474 | isSuggested?: boolean;
|
475 | /**
|
476 | * Name of the picklist
|
477 | */
|
478 | name?: string;
|
479 | /**
|
480 | * DataType of picklist
|
481 | */
|
482 | type?: string;
|
483 | /**
|
484 | * Url of the picklist
|
485 | */
|
486 | url?: string;
|
487 | }
|
488 | /**
|
489 | * Process Behavior Model.
|
490 | */
|
491 | export interface ProcessBehavior {
|
492 | /**
|
493 | * Color.
|
494 | */
|
495 | color?: string;
|
496 | /**
|
497 | * Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process.
|
498 | */
|
499 | customization?: CustomizationType;
|
500 | /**
|
501 | * . Description
|
502 | */
|
503 | description?: string;
|
504 | /**
|
505 | * Process Behavior Fields.
|
506 | */
|
507 | fields?: ProcessBehaviorField[];
|
508 | /**
|
509 | * Parent behavior reference.
|
510 | */
|
511 | inherits?: ProcessBehaviorReference;
|
512 | /**
|
513 | * Behavior Name.
|
514 | */
|
515 | name?: string;
|
516 | /**
|
517 | * Rank of the behavior
|
518 | */
|
519 | rank?: number;
|
520 | /**
|
521 | * Behavior Id
|
522 | */
|
523 | referenceName?: string;
|
524 | /**
|
525 | * Url of the behavior.
|
526 | */
|
527 | url?: string;
|
528 | }
|
529 | /**
|
530 | * Process Behavior Create Payload.
|
531 | */
|
532 | export interface ProcessBehaviorCreateRequest {
|
533 | /**
|
534 | * Color.
|
535 | */
|
536 | color?: string;
|
537 | /**
|
538 | * Parent behavior id.
|
539 | */
|
540 | inherits?: string;
|
541 | /**
|
542 | * Name of the behavior.
|
543 | */
|
544 | name?: string;
|
545 | /**
|
546 | * ReferenceName is optional, if not specified will be auto-generated.
|
547 | */
|
548 | referenceName?: string;
|
549 | }
|
550 | /**
|
551 | * Process Behavior Field.
|
552 | */
|
553 | export interface ProcessBehaviorField {
|
554 | /**
|
555 | * Name of the field.
|
556 | */
|
557 | name?: string;
|
558 | /**
|
559 | * Reference name of the field.
|
560 | */
|
561 | referenceName?: string;
|
562 | /**
|
563 | * Url to field.
|
564 | */
|
565 | url?: string;
|
566 | }
|
567 | /**
|
568 | * Process behavior Reference.
|
569 | */
|
570 | export interface ProcessBehaviorReference {
|
571 | /**
|
572 | * Id of a Behavior.
|
573 | */
|
574 | behaviorRefName?: string;
|
575 | /**
|
576 | * Url to behavior.
|
577 | */
|
578 | url?: string;
|
579 | }
|
580 | /**
|
581 | * Process Behavior Replace Payload.
|
582 | */
|
583 | export interface ProcessBehaviorUpdateRequest {
|
584 | /**
|
585 | * Color.
|
586 | */
|
587 | color?: string;
|
588 | /**
|
589 | * Behavior Name.
|
590 | */
|
591 | name?: string;
|
592 | }
|
593 | export declare enum ProcessClass {
|
594 | System = 0,
|
595 | Derived = 1,
|
596 | Custom = 2
|
597 | }
|
598 | /**
|
599 | * Process.
|
600 | */
|
601 | export interface ProcessInfo {
|
602 | /**
|
603 | * Indicates the type of customization on this process. System Process is default process. Inherited Process is modified process that was System process before.
|
604 | */
|
605 | customizationType?: CustomizationType;
|
606 | /**
|
607 | * Description of the process.
|
608 | */
|
609 | description?: string;
|
610 | /**
|
611 | * Is the process default.
|
612 | */
|
613 | isDefault?: boolean;
|
614 | /**
|
615 | * Is the process enabled.
|
616 | */
|
617 | isEnabled?: boolean;
|
618 | /**
|
619 | * Name of the process.
|
620 | */
|
621 | name?: string;
|
622 | /**
|
623 | * ID of the parent process.
|
624 | */
|
625 | parentProcessTypeId?: string;
|
626 | /**
|
627 | * Projects in this process to which the user is subscribed to.
|
628 | */
|
629 | projects?: ProjectReference[];
|
630 | /**
|
631 | * Reference name of the process.
|
632 | */
|
633 | referenceName?: string;
|
634 | /**
|
635 | * The ID of the process.
|
636 | */
|
637 | typeId?: string;
|
638 | }
|
639 | export interface ProcessModel {
|
640 | /**
|
641 | * Description of the process
|
642 | */
|
643 | description?: string;
|
644 | /**
|
645 | * Name of the process
|
646 | */
|
647 | name?: string;
|
648 | /**
|
649 | * Projects in this process
|
650 | */
|
651 | projects?: ProjectReference[];
|
652 | /**
|
653 | * Properties of the process
|
654 | */
|
655 | properties?: ProcessProperties;
|
656 | /**
|
657 | * Reference name of the process
|
658 | */
|
659 | referenceName?: string;
|
660 | /**
|
661 | * The ID of the process
|
662 | */
|
663 | typeId?: string;
|
664 | }
|
665 | /**
|
666 | * Properties of the process.
|
667 | */
|
668 | export interface ProcessProperties {
|
669 | /**
|
670 | * Class of the process.
|
671 | */
|
672 | class?: ProcessClass;
|
673 | /**
|
674 | * Is the process default process.
|
675 | */
|
676 | isDefault?: boolean;
|
677 | /**
|
678 | * Is the process enabled.
|
679 | */
|
680 | isEnabled?: boolean;
|
681 | /**
|
682 | * ID of the parent process.
|
683 | */
|
684 | parentProcessTypeId?: string;
|
685 | /**
|
686 | * Version of the process.
|
687 | */
|
688 | version?: string;
|
689 | }
|
690 | /**
|
691 | * Process Rule Response.
|
692 | */
|
693 | export interface ProcessRule extends CreateProcessRuleRequest {
|
694 | /**
|
695 | * Indicates if the rule is system generated or created by user.
|
696 | */
|
697 | customizationType?: CustomizationType;
|
698 | /**
|
699 | * Id to uniquely identify the rule.
|
700 | */
|
701 | id?: string;
|
702 | /**
|
703 | * Resource Url.
|
704 | */
|
705 | url?: string;
|
706 | }
|
707 | /**
|
708 | * Class that describes a work item type object
|
709 | */
|
710 | export interface ProcessWorkItemType {
|
711 | behaviors?: WorkItemTypeBehavior[];
|
712 | /**
|
713 | * Color hexadecimal code to represent the work item type
|
714 | */
|
715 | color?: string;
|
716 | /**
|
717 | * Indicates the type of customization on this work item System work item types are inherited from parent process but not modified Inherited work item types are modified work item that were inherited from parent process Custom work item types are work item types that were created in the current process
|
718 | */
|
719 | customization?: CustomizationType;
|
720 | /**
|
721 | * Description of the work item type
|
722 | */
|
723 | description?: string;
|
724 | /**
|
725 | * Icon to represent the work item typ
|
726 | */
|
727 | icon?: string;
|
728 | /**
|
729 | * Reference name of the parent work item type
|
730 | */
|
731 | inherits?: string;
|
732 | /**
|
733 | * Indicates if a work item type is disabled
|
734 | */
|
735 | isDisabled?: boolean;
|
736 | layout?: FormLayout;
|
737 | /**
|
738 | * Name of the work item type
|
739 | */
|
740 | name?: string;
|
741 | /**
|
742 | * Reference name of work item type
|
743 | */
|
744 | referenceName?: string;
|
745 | states?: WorkItemStateResultModel[];
|
746 | /**
|
747 | * Url of the work item type
|
748 | */
|
749 | url?: string;
|
750 | }
|
751 | /**
|
752 | * Class that describes a field in a work item type and its properties.
|
753 | */
|
754 | export interface ProcessWorkItemTypeField {
|
755 | /**
|
756 | * The list of field allowed values.
|
757 | */
|
758 | allowedValues?: any[];
|
759 | /**
|
760 | * Allow setting field value to a group identity. Only applies to identity fields.
|
761 | */
|
762 | allowGroups?: boolean;
|
763 | /**
|
764 | * Indicates the type of customization on this work item.
|
765 | */
|
766 | customization?: CustomizationType;
|
767 | /**
|
768 | * The default value of the field.
|
769 | */
|
770 | defaultValue?: any;
|
771 | /**
|
772 | * Description of the field.
|
773 | */
|
774 | description?: string;
|
775 | /**
|
776 | * Information about field definition being locked for editing
|
777 | */
|
778 | isLocked?: boolean;
|
779 | /**
|
780 | * Name of the field.
|
781 | */
|
782 | name?: string;
|
783 | /**
|
784 | * If true the field cannot be edited.
|
785 | */
|
786 | readOnly?: boolean;
|
787 | /**
|
788 | * Reference name of the field.
|
789 | */
|
790 | referenceName?: string;
|
791 | /**
|
792 | * If true the field cannot be empty.
|
793 | */
|
794 | required?: boolean;
|
795 | /**
|
796 | * Type of the field.
|
797 | */
|
798 | type?: FieldType;
|
799 | /**
|
800 | * Resource URL of the field.
|
801 | */
|
802 | url?: string;
|
803 | }
|
804 | /**
|
805 | * Expand options for the work item field(s) request.
|
806 | */
|
807 | export declare enum ProcessWorkItemTypeFieldsExpandLevel {
|
808 | /**
|
809 | * Includes only basic properties of the field.
|
810 | */
|
811 | None = 0,
|
812 | /**
|
813 | * Includes allowed values for the field.
|
814 | */
|
815 | AllowedValues = 1,
|
816 | /**
|
817 | * Includes allowed values and dependent fields of the field.
|
818 | */
|
819 | All = 2
|
820 | }
|
821 | /**
|
822 | * Defines the project reference class.
|
823 | */
|
824 | export interface ProjectReference {
|
825 | /**
|
826 | * Description of the project
|
827 | */
|
828 | description?: string;
|
829 | /**
|
830 | * The ID of the project
|
831 | */
|
832 | id?: string;
|
833 | /**
|
834 | * Name of the project
|
835 | */
|
836 | name?: string;
|
837 | /**
|
838 | * Url of the project
|
839 | */
|
840 | url?: string;
|
841 | }
|
842 | /**
|
843 | * Action to take when the rule is triggered.
|
844 | */
|
845 | export interface RuleAction {
|
846 | /**
|
847 | * Type of action to take when the rule is triggered.
|
848 | */
|
849 | actionType?: RuleActionType;
|
850 | /**
|
851 | * Field on which the action should be taken.
|
852 | */
|
853 | targetField?: string;
|
854 | /**
|
855 | * Value to apply on target field, once the action is taken.
|
856 | */
|
857 | value?: string;
|
858 | }
|
859 | /**
|
860 | * Action to take when the rule is triggered.
|
861 | */
|
862 | export interface RuleActionModel {
|
863 | actionType?: string;
|
864 | targetField?: string;
|
865 | value?: string;
|
866 | }
|
867 | /**
|
868 | * Type of action to take when the rule is triggered.
|
869 | */
|
870 | export declare enum RuleActionType {
|
871 | /**
|
872 | * Make the target field required. Example : {"actionType":"$makeRequired","targetField":"Microsoft.VSTS.Common.Activity","value":""}
|
873 | */
|
874 | MakeRequired = 1,
|
875 | /**
|
876 | * Make the target field read-only. Example : {"actionType":"$makeReadOnly","targetField":"Microsoft.VSTS.Common.Activity","value":""}
|
877 | */
|
878 | MakeReadOnly = 2,
|
879 | /**
|
880 | * 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.
|
881 | */
|
882 | SetDefaultValue = 3,
|
883 | /**
|
884 | * 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.
|
885 | */
|
886 | SetDefaultFromClock = 4,
|
887 | /**
|
888 | * 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.
|
889 | */
|
890 | SetDefaultFromCurrentUser = 5,
|
891 | /**
|
892 | * 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.
|
893 | */
|
894 | SetDefaultFromField = 6,
|
895 | /**
|
896 | * Set the value of target field to given value. Example : {actionType: "$copyValue", targetField: "ScrumInherited.mypicklist", value: "samplevalue"}
|
897 | */
|
898 | CopyValue = 7,
|
899 | /**
|
900 | * Set the value from clock.
|
901 | */
|
902 | CopyFromClock = 8,
|
903 | /**
|
904 | * Set the current user to the target field. Example : {"actionType":"$copyFromCurrentUser","targetField":"System.AssignedTo","value":""}.
|
905 | */
|
906 | CopyFromCurrentUser = 9,
|
907 | /**
|
908 | * 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.
|
909 | */
|
910 | CopyFromField = 10,
|
911 | /**
|
912 | * Set the value of the target field to empty.
|
913 | */
|
914 | SetValueToEmpty = 11,
|
915 | /**
|
916 | * Use the current time to set the value of the target field. Example : {actionType: "$copyFromServerClock", targetField: "System.CreatedDate", value: ""}
|
917 | */
|
918 | CopyFromServerClock = 12,
|
919 | /**
|
920 | * Use the current user to set the value of the target field.
|
921 | */
|
922 | CopyFromServerCurrentUser = 13,
|
923 | /**
|
924 | * Hides target field from the form. This is a server side only action.
|
925 | */
|
926 | HideTargetField = 14,
|
927 | /**
|
928 | * Disallows a field from being set to a specific value.
|
929 | */
|
930 | DisallowValue = 15
|
931 | }
|
932 | /**
|
933 | * Defines a condition on a field when the rule should be triggered.
|
934 | */
|
935 | export interface RuleCondition {
|
936 | /**
|
937 | * Type of condition. $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. $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. $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. $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.
|
938 | */
|
939 | conditionType?: RuleConditionType;
|
940 | /**
|
941 | * Field that defines condition.
|
942 | */
|
943 | field?: string;
|
944 | /**
|
945 | * Value of field to define the condition for rule.
|
946 | */
|
947 | value?: string;
|
948 | }
|
949 | export interface RuleConditionModel {
|
950 | conditionType?: string;
|
951 | field?: string;
|
952 | value?: string;
|
953 | }
|
954 | /**
|
955 | * Type of rule condition.
|
956 | */
|
957 | export declare enum RuleConditionType {
|
958 | /**
|
959 | * $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.
|
960 | */
|
961 | When = 1,
|
962 | /**
|
963 | * $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.
|
964 | */
|
965 | WhenNot = 2,
|
966 | /**
|
967 | * $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.
|
968 | */
|
969 | WhenChanged = 3,
|
970 | /**
|
971 | * $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.
|
972 | */
|
973 | WhenNotChanged = 4,
|
974 | /**
|
975 | * $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.
|
976 | */
|
977 | WhenWas = 5,
|
978 | WhenStateChangedTo = 6,
|
979 | WhenStateChangedFromAndTo = 7,
|
980 | WhenWorkItemIsCreated = 8,
|
981 | WhenValueIsDefined = 9,
|
982 | WhenValueIsNotDefined = 10,
|
983 | /**
|
984 | * 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"
|
985 | */
|
986 | WhenCurrentUserIsMemberOfGroup = 11,
|
987 | /**
|
988 | * 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"
|
989 | */
|
990 | WhenCurrentUserIsNotMemberOfGroup = 12
|
991 | }
|
992 | /**
|
993 | * Defines a section of the work item form layout
|
994 | */
|
995 | export interface Section {
|
996 | /**
|
997 | * List of child groups in this section
|
998 | */
|
999 | groups?: Group[];
|
1000 | /**
|
1001 | * The id for the layout node.
|
1002 | */
|
1003 | id?: string;
|
1004 | /**
|
1005 | * A value indicating whether this layout node has been overridden by a child layout.
|
1006 | */
|
1007 | overridden?: boolean;
|
1008 | }
|
1009 | /**
|
1010 | * Describes a request to update a process
|
1011 | */
|
1012 | export interface UpdateProcessModel {
|
1013 | /**
|
1014 | * New description of the process
|
1015 | */
|
1016 | description?: string;
|
1017 | /**
|
1018 | * If true new projects will use this process by default
|
1019 | */
|
1020 | isDefault?: boolean;
|
1021 | /**
|
1022 | * If false the process will be disabled and cannot be used to create projects
|
1023 | */
|
1024 | isEnabled?: boolean;
|
1025 | /**
|
1026 | * New name of the process
|
1027 | */
|
1028 | name?: string;
|
1029 | }
|
1030 | /**
|
1031 | * Request class/object to update the rule.
|
1032 | */
|
1033 | export interface UpdateProcessRuleRequest extends CreateProcessRuleRequest {
|
1034 | /**
|
1035 | * Id to uniquely identify the rule.
|
1036 | */
|
1037 | id?: string;
|
1038 | }
|
1039 | /**
|
1040 | * Class to describe a request that updates a field's properties in a work item type.
|
1041 | */
|
1042 | export interface UpdateProcessWorkItemTypeFieldRequest {
|
1043 | /**
|
1044 | * The list of field allowed values.
|
1045 | */
|
1046 | allowedValues?: string[];
|
1047 | /**
|
1048 | * Allow setting field value to a group identity. Only applies to identity fields.
|
1049 | */
|
1050 | allowGroups?: boolean;
|
1051 | /**
|
1052 | * The default value of the field.
|
1053 | */
|
1054 | defaultValue?: any;
|
1055 | /**
|
1056 | * If true the field cannot be edited.
|
1057 | */
|
1058 | readOnly?: boolean;
|
1059 | /**
|
1060 | * The default value of the field.
|
1061 | */
|
1062 | required?: boolean;
|
1063 | }
|
1064 | /**
|
1065 | * Class for update request on a work item type
|
1066 | */
|
1067 | export interface UpdateProcessWorkItemTypeRequest {
|
1068 | /**
|
1069 | * Color of the work item type
|
1070 | */
|
1071 | color?: string;
|
1072 | /**
|
1073 | * Description of the work item type
|
1074 | */
|
1075 | description?: string;
|
1076 | /**
|
1077 | * Icon of the work item type
|
1078 | */
|
1079 | icon?: string;
|
1080 | /**
|
1081 | * If set will disable the work item type
|
1082 | */
|
1083 | isDisabled?: boolean;
|
1084 | }
|
1085 | /**
|
1086 | * Properties of a work item form contribution
|
1087 | */
|
1088 | export interface WitContribution {
|
1089 | /**
|
1090 | * The id for the contribution.
|
1091 | */
|
1092 | contributionId?: string;
|
1093 | /**
|
1094 | * The height for the contribution.
|
1095 | */
|
1096 | height?: number;
|
1097 | /**
|
1098 | * A dictionary holding key value pairs for contribution inputs.
|
1099 | */
|
1100 | inputs?: {
|
1101 | [key: string]: any;
|
1102 | };
|
1103 | /**
|
1104 | * A value indicating if the contribution should be show on deleted workItem.
|
1105 | */
|
1106 | showOnDeletedWorkItem?: boolean;
|
1107 | }
|
1108 | export interface WorkItemBehavior {
|
1109 | abstract?: boolean;
|
1110 | color?: string;
|
1111 | description?: string;
|
1112 | fields?: WorkItemBehaviorField[];
|
1113 | id?: string;
|
1114 | inherits?: WorkItemBehaviorReference;
|
1115 | name?: string;
|
1116 | overriden?: boolean;
|
1117 | rank?: number;
|
1118 | url?: string;
|
1119 | }
|
1120 | export interface WorkItemBehaviorField {
|
1121 | behaviorFieldId?: string;
|
1122 | id?: string;
|
1123 | url?: string;
|
1124 | }
|
1125 | /**
|
1126 | * Reference to the behavior of a work item type.
|
1127 | */
|
1128 | export interface WorkItemBehaviorReference {
|
1129 | /**
|
1130 | * The ID of the reference behavior.
|
1131 | */
|
1132 | id?: string;
|
1133 | /**
|
1134 | * The url of the reference behavior.
|
1135 | */
|
1136 | url?: string;
|
1137 | }
|
1138 | /**
|
1139 | * Class That represents a work item state input.
|
1140 | */
|
1141 | export interface WorkItemStateInputModel {
|
1142 | /**
|
1143 | * Color of the state
|
1144 | */
|
1145 | color?: string;
|
1146 | /**
|
1147 | * Name of the state
|
1148 | */
|
1149 | name?: string;
|
1150 | /**
|
1151 | * Order in which state should appear
|
1152 | */
|
1153 | order?: number;
|
1154 | /**
|
1155 | * Category of the state
|
1156 | */
|
1157 | stateCategory?: string;
|
1158 | }
|
1159 | /**
|
1160 | * Class that represents a work item state result.
|
1161 | */
|
1162 | export interface WorkItemStateResultModel {
|
1163 | /**
|
1164 | * Work item state color.
|
1165 | */
|
1166 | color?: string;
|
1167 | /**
|
1168 | * Work item state customization type.
|
1169 | */
|
1170 | customizationType?: CustomizationType;
|
1171 | /**
|
1172 | * If the Work item state is hidden.
|
1173 | */
|
1174 | hidden?: boolean;
|
1175 | /**
|
1176 | * Id of the Workitemstate.
|
1177 | */
|
1178 | id?: string;
|
1179 | /**
|
1180 | * Work item state name.
|
1181 | */
|
1182 | name?: string;
|
1183 | /**
|
1184 | * Work item state order.
|
1185 | */
|
1186 | order?: number;
|
1187 | /**
|
1188 | * Work item state statecategory.
|
1189 | */
|
1190 | stateCategory?: string;
|
1191 | /**
|
1192 | * Work item state url.
|
1193 | */
|
1194 | url?: string;
|
1195 | }
|
1196 | /**
|
1197 | * Association between a work item type and it's behavior
|
1198 | */
|
1199 | export interface WorkItemTypeBehavior {
|
1200 | /**
|
1201 | * Reference to the behavior of a work item type
|
1202 | */
|
1203 | behavior?: WorkItemBehaviorReference;
|
1204 | /**
|
1205 | * If true the work item type is the default work item type in the behavior
|
1206 | */
|
1207 | isDefault?: boolean;
|
1208 | /**
|
1209 | * If true the work item type is the default work item type in the parent behavior
|
1210 | */
|
1211 | isLegacyDefault?: boolean;
|
1212 | /**
|
1213 | * URL of the work item type behavior
|
1214 | */
|
1215 | url?: string;
|
1216 | }
|
1217 | export declare enum WorkItemTypeClass {
|
1218 | System = 0,
|
1219 | Derived = 1,
|
1220 | Custom = 2
|
1221 | }
|
1222 | export interface WorkItemTypeModel {
|
1223 | behaviors?: WorkItemTypeBehavior[];
|
1224 | class?: WorkItemTypeClass;
|
1225 | color?: string;
|
1226 | description?: string;
|
1227 | icon?: string;
|
1228 | id?: string;
|
1229 | /**
|
1230 | * Parent WIT Id/Internal ReferenceName that it inherits from
|
1231 | */
|
1232 | inherits?: string;
|
1233 | isDisabled?: boolean;
|
1234 | layout?: FormLayout;
|
1235 | name?: string;
|
1236 | states?: WorkItemStateResultModel[];
|
1237 | url?: string;
|
1238 | }
|
1239 | export declare var TypeInfo: {
|
1240 | CreateProcessRuleRequest: any;
|
1241 | CustomizationType: {
|
1242 | enumValues: {
|
1243 | system: number;
|
1244 | inherited: number;
|
1245 | custom: number;
|
1246 | };
|
1247 | };
|
1248 | FieldModel: any;
|
1249 | FieldType: {
|
1250 | enumValues: {
|
1251 | string: number;
|
1252 | integer: number;
|
1253 | dateTime: number;
|
1254 | plainText: number;
|
1255 | html: number;
|
1256 | treePath: number;
|
1257 | history: number;
|
1258 | double: number;
|
1259 | guid: number;
|
1260 | boolean: number;
|
1261 | identity: number;
|
1262 | picklistInteger: number;
|
1263 | picklistString: number;
|
1264 | picklistDouble: number;
|
1265 | };
|
1266 | };
|
1267 | FormLayout: any;
|
1268 | GetBehaviorsExpand: {
|
1269 | enumValues: {
|
1270 | none: number;
|
1271 | fields: number;
|
1272 | combinedFields: number;
|
1273 | };
|
1274 | };
|
1275 | GetProcessExpandLevel: {
|
1276 | enumValues: {
|
1277 | none: number;
|
1278 | projects: number;
|
1279 | };
|
1280 | };
|
1281 | GetWorkItemTypeExpand: {
|
1282 | enumValues: {
|
1283 | none: number;
|
1284 | states: number;
|
1285 | behaviors: number;
|
1286 | layout: number;
|
1287 | };
|
1288 | };
|
1289 | Page: any;
|
1290 | PageType: {
|
1291 | enumValues: {
|
1292 | custom: number;
|
1293 | history: number;
|
1294 | links: number;
|
1295 | attachments: number;
|
1296 | };
|
1297 | };
|
1298 | ProcessBehavior: any;
|
1299 | ProcessClass: {
|
1300 | enumValues: {
|
1301 | system: number;
|
1302 | derived: number;
|
1303 | custom: number;
|
1304 | };
|
1305 | };
|
1306 | ProcessInfo: any;
|
1307 | ProcessModel: any;
|
1308 | ProcessProperties: any;
|
1309 | ProcessRule: any;
|
1310 | ProcessWorkItemType: any;
|
1311 | ProcessWorkItemTypeField: any;
|
1312 | ProcessWorkItemTypeFieldsExpandLevel: {
|
1313 | enumValues: {
|
1314 | none: number;
|
1315 | allowedValues: number;
|
1316 | all: number;
|
1317 | };
|
1318 | };
|
1319 | RuleAction: any;
|
1320 | RuleActionType: {
|
1321 | enumValues: {
|
1322 | makeRequired: number;
|
1323 | makeReadOnly: number;
|
1324 | setDefaultValue: number;
|
1325 | setDefaultFromClock: number;
|
1326 | setDefaultFromCurrentUser: number;
|
1327 | setDefaultFromField: number;
|
1328 | copyValue: number;
|
1329 | copyFromClock: number;
|
1330 | copyFromCurrentUser: number;
|
1331 | copyFromField: number;
|
1332 | setValueToEmpty: number;
|
1333 | copyFromServerClock: number;
|
1334 | copyFromServerCurrentUser: number;
|
1335 | hideTargetField: number;
|
1336 | disallowValue: number;
|
1337 | };
|
1338 | };
|
1339 | RuleCondition: any;
|
1340 | RuleConditionType: {
|
1341 | enumValues: {
|
1342 | when: number;
|
1343 | whenNot: number;
|
1344 | whenChanged: number;
|
1345 | whenNotChanged: number;
|
1346 | whenWas: number;
|
1347 | whenStateChangedTo: number;
|
1348 | whenStateChangedFromAndTo: number;
|
1349 | whenWorkItemIsCreated: number;
|
1350 | whenValueIsDefined: number;
|
1351 | whenValueIsNotDefined: number;
|
1352 | whenCurrentUserIsMemberOfGroup: number;
|
1353 | whenCurrentUserIsNotMemberOfGroup: number;
|
1354 | };
|
1355 | };
|
1356 | UpdateProcessRuleRequest: any;
|
1357 | WorkItemStateResultModel: any;
|
1358 | WorkItemTypeClass: {
|
1359 | enumValues: {
|
1360 | system: number;
|
1361 | derived: number;
|
1362 | custom: number;
|
1363 | };
|
1364 | };
|
1365 | WorkItemTypeModel: any;
|
1366 | };
|