1 | import TfsCoreInterfaces = require("../interfaces/CoreInterfaces");
|
2 | import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
|
3 | export interface AssociatedWorkItem {
|
4 | assignedTo?: string;
|
5 | /**
|
6 | * Id of associated the work item.
|
7 | */
|
8 | id?: number;
|
9 | state?: string;
|
10 | title?: string;
|
11 | /**
|
12 | * REST Url of the work item.
|
13 | */
|
14 | url?: string;
|
15 | webUrl?: string;
|
16 | workItemType?: string;
|
17 | }
|
18 | export interface Change<T> {
|
19 | /**
|
20 | * The type of change that was made to the item.
|
21 | */
|
22 | changeType?: VersionControlChangeType;
|
23 | /**
|
24 | * Current version.
|
25 | */
|
26 | item?: T;
|
27 | /**
|
28 | * Content of the item after the change.
|
29 | */
|
30 | newContent?: ItemContent;
|
31 | /**
|
32 | * Path of the item on the server.
|
33 | */
|
34 | sourceServerItem?: string;
|
35 | /**
|
36 | * URL to retrieve the item.
|
37 | */
|
38 | url?: string;
|
39 | }
|
40 | export interface CheckinNote {
|
41 | name?: string;
|
42 | value?: string;
|
43 | }
|
44 | export interface FileContentMetadata {
|
45 | contentType?: string;
|
46 | encoding?: number;
|
47 | extension?: string;
|
48 | fileName?: string;
|
49 | isBinary?: boolean;
|
50 | isImage?: boolean;
|
51 | vsLink?: string;
|
52 | }
|
53 | export interface GitRepository {
|
54 | _links?: any;
|
55 | defaultBranch?: string;
|
56 | id?: string;
|
57 | /**
|
58 | * True if the repository is disabled. False otherwise.
|
59 | */
|
60 | isDisabled?: boolean;
|
61 | /**
|
62 | * True if the repository was created as a fork.
|
63 | */
|
64 | isFork?: boolean;
|
65 | /**
|
66 | * True if the repository is in maintenance. False otherwise.
|
67 | */
|
68 | isInMaintenance?: boolean;
|
69 | name?: string;
|
70 | parentRepository?: GitRepositoryRef;
|
71 | project?: TfsCoreInterfaces.TeamProjectReference;
|
72 | remoteUrl?: string;
|
73 | /**
|
74 | * Compressed size (bytes) of the repository.
|
75 | */
|
76 | size?: number;
|
77 | sshUrl?: string;
|
78 | url?: string;
|
79 | validRemoteUrls?: string[];
|
80 | webUrl?: string;
|
81 | }
|
82 | export interface GitRepositoryRef {
|
83 | /**
|
84 | * Team Project Collection where this Fork resides
|
85 | */
|
86 | collection?: TfsCoreInterfaces.TeamProjectCollectionReference;
|
87 | id?: string;
|
88 | /**
|
89 | * True if the repository was created as a fork
|
90 | */
|
91 | isFork?: boolean;
|
92 | name?: string;
|
93 | project?: TfsCoreInterfaces.TeamProjectReference;
|
94 | remoteUrl?: string;
|
95 | sshUrl?: string;
|
96 | url?: string;
|
97 | }
|
98 | export interface ItemContent {
|
99 | content?: string;
|
100 | contentType?: ItemContentType;
|
101 | }
|
102 | export declare enum ItemContentType {
|
103 | RawText = 0,
|
104 | Base64Encoded = 1
|
105 | }
|
106 | export interface ItemModel {
|
107 | _links?: any;
|
108 | content?: string;
|
109 | contentMetadata?: FileContentMetadata;
|
110 | isFolder?: boolean;
|
111 | isSymLink?: boolean;
|
112 | path?: string;
|
113 | url?: string;
|
114 | }
|
115 | /**
|
116 | * Class representing a branch object.
|
117 | */
|
118 | export interface TfvcBranch extends TfvcBranchRef {
|
119 | /**
|
120 | * List of children for the branch.
|
121 | */
|
122 | children?: TfvcBranch[];
|
123 | /**
|
124 | * List of branch mappings.
|
125 | */
|
126 | mappings?: TfvcBranchMapping[];
|
127 | /**
|
128 | * Path of the branch's parent.
|
129 | */
|
130 | parent?: TfvcShallowBranchRef;
|
131 | /**
|
132 | * List of paths of the related branches.
|
133 | */
|
134 | relatedBranches?: TfvcShallowBranchRef[];
|
135 | }
|
136 | /**
|
137 | * A branch mapping.
|
138 | */
|
139 | export interface TfvcBranchMapping {
|
140 | /**
|
141 | * Depth of the branch.
|
142 | */
|
143 | depth?: string;
|
144 | /**
|
145 | * Server item for the branch.
|
146 | */
|
147 | serverItem?: string;
|
148 | /**
|
149 | * Type of the branch.
|
150 | */
|
151 | type?: string;
|
152 | }
|
153 | /**
|
154 | * Metadata for a branchref.
|
155 | */
|
156 | export interface TfvcBranchRef extends TfvcShallowBranchRef {
|
157 | /**
|
158 | * A collection of REST reference links.
|
159 | */
|
160 | _links?: any;
|
161 | /**
|
162 | * Creation date of the branch.
|
163 | */
|
164 | createdDate?: Date;
|
165 | /**
|
166 | * Branch description.
|
167 | */
|
168 | description?: string;
|
169 | /**
|
170 | * Is the branch deleted?
|
171 | */
|
172 | isDeleted?: boolean;
|
173 | /**
|
174 | * Alias or display name of user
|
175 | */
|
176 | owner?: VSSInterfaces.IdentityRef;
|
177 | /**
|
178 | * URL to retrieve the item.
|
179 | */
|
180 | url?: string;
|
181 | }
|
182 | /**
|
183 | * A change.
|
184 | */
|
185 | export interface TfvcChange extends Change<TfvcItem> {
|
186 | /**
|
187 | * List of merge sources in case of rename or branch creation.
|
188 | */
|
189 | mergeSources?: TfvcMergeSource[];
|
190 | /**
|
191 | * Version at which a (shelved) change was pended against
|
192 | */
|
193 | pendingVersion?: number;
|
194 | }
|
195 | /**
|
196 | * A collection of changes.
|
197 | */
|
198 | export interface TfvcChangeset extends TfvcChangesetRef {
|
199 | /**
|
200 | * Changeset Account Id also known as Organization Id.
|
201 | */
|
202 | accountId?: string;
|
203 | /**
|
204 | * List of associated changes.
|
205 | */
|
206 | changes?: TfvcChange[];
|
207 | /**
|
208 | * List of Checkin Notes for the changeset.
|
209 | */
|
210 | checkinNotes?: CheckinNote[];
|
211 | /**
|
212 | * Changeset collection Id.
|
213 | */
|
214 | collectionId?: string;
|
215 | /**
|
216 | * True if more changes are available.
|
217 | */
|
218 | hasMoreChanges?: boolean;
|
219 | /**
|
220 | * Policy Override for the changeset.
|
221 | */
|
222 | policyOverride?: TfvcPolicyOverrideInfo;
|
223 | /**
|
224 | * Team Project Ids for the changeset.
|
225 | */
|
226 | teamProjectIds?: string[];
|
227 | /**
|
228 | * List of work items associated with the changeset.
|
229 | */
|
230 | workItems?: AssociatedWorkItem[];
|
231 | }
|
232 | /**
|
233 | * Metadata for a changeset.
|
234 | */
|
235 | export interface TfvcChangesetRef {
|
236 | /**
|
237 | * A collection of REST reference links.
|
238 | */
|
239 | _links?: any;
|
240 | /**
|
241 | * Alias or display name of user.
|
242 | */
|
243 | author?: VSSInterfaces.IdentityRef;
|
244 | /**
|
245 | * Changeset Id.
|
246 | */
|
247 | changesetId?: number;
|
248 | /**
|
249 | * Alias or display name of user.
|
250 | */
|
251 | checkedInBy?: VSSInterfaces.IdentityRef;
|
252 | /**
|
253 | * Comment for the changeset.
|
254 | */
|
255 | comment?: string;
|
256 | /**
|
257 | * Was the Comment result truncated?
|
258 | */
|
259 | commentTruncated?: boolean;
|
260 | /**
|
261 | * Creation date of the changeset.
|
262 | */
|
263 | createdDate?: Date;
|
264 | /**
|
265 | * URL to retrieve the item.
|
266 | */
|
267 | url?: string;
|
268 | }
|
269 | /**
|
270 | * Criteria used in a search for change lists.
|
271 | */
|
272 | export interface TfvcChangesetSearchCriteria {
|
273 | /**
|
274 | * Alias or display name of user who made the changes.
|
275 | */
|
276 | author?: string;
|
277 | /**
|
278 | * Whether or not to follow renames for the given item being queried.
|
279 | */
|
280 | followRenames?: boolean;
|
281 | /**
|
282 | * If provided, only include changesets created after this date (string).
|
283 | */
|
284 | fromDate?: string;
|
285 | /**
|
286 | * If provided, only include changesets after this changesetID.
|
287 | */
|
288 | fromId?: number;
|
289 | /**
|
290 | * Whether to include the _links field on the shallow references.
|
291 | */
|
292 | includeLinks?: boolean;
|
293 | /**
|
294 | * Path of item to search under.
|
295 | */
|
296 | itemPath?: string;
|
297 | mappings?: TfvcMappingFilter[];
|
298 | /**
|
299 | * If provided, only include changesets created before this date (string).
|
300 | */
|
301 | toDate?: string;
|
302 | /**
|
303 | * If provided, a version descriptor for the latest change list to include.
|
304 | */
|
305 | toId?: number;
|
306 | }
|
307 | /**
|
308 | * Request body for Get batched changesets.
|
309 | */
|
310 | export interface TfvcChangesetsRequestData {
|
311 | /**
|
312 | * List of changeset Ids.
|
313 | */
|
314 | changesetIds?: number[];
|
315 | /**
|
316 | * Max length of the comment.
|
317 | */
|
318 | commentLength?: number;
|
319 | /**
|
320 | * Whether to include the _links field on the shallow references
|
321 | */
|
322 | includeLinks?: boolean;
|
323 | }
|
324 | /**
|
325 | * Metadata for an item.
|
326 | */
|
327 | export interface TfvcItem extends ItemModel {
|
328 | /**
|
329 | * Item changed datetime.
|
330 | */
|
331 | changeDate?: Date;
|
332 | /**
|
333 | * Greater than 0 if item is deleted.
|
334 | */
|
335 | deletionId?: number;
|
336 | /**
|
337 | * File encoding from database, -1 represents binary.
|
338 | */
|
339 | encoding?: number;
|
340 | /**
|
341 | * MD5 hash as a base 64 string, applies to files only.
|
342 | */
|
343 | hashValue?: string;
|
344 | /**
|
345 | * True if item is a branch.
|
346 | */
|
347 | isBranch?: boolean;
|
348 | /**
|
349 | * True if there is a change pending.
|
350 | */
|
351 | isPendingChange?: boolean;
|
352 | /**
|
353 | * The size of the file, if applicable.
|
354 | */
|
355 | size?: number;
|
356 | /**
|
357 | * Changeset version Id.
|
358 | */
|
359 | version?: number;
|
360 | }
|
361 | /**
|
362 | * Item path and Version descriptor properties
|
363 | */
|
364 | export interface TfvcItemDescriptor {
|
365 | /**
|
366 | * Item path.
|
367 | */
|
368 | path?: string;
|
369 | /**
|
370 | * Defaults to OneLevel.
|
371 | */
|
372 | recursionLevel?: VersionControlRecursionType;
|
373 | /**
|
374 | * Specify the desired version, can be null or empty string only if VersionType is latest or tip.
|
375 | */
|
376 | version?: string;
|
377 | /**
|
378 | * Defaults to None.
|
379 | */
|
380 | versionOption?: TfvcVersionOption;
|
381 | /**
|
382 | * Defaults to Latest.
|
383 | */
|
384 | versionType?: TfvcVersionType;
|
385 | }
|
386 | /**
|
387 | * Request body used by Get Items Batch
|
388 | */
|
389 | export interface TfvcItemRequestData {
|
390 | /**
|
391 | * If true, include metadata about the file type
|
392 | */
|
393 | includeContentMetadata?: boolean;
|
394 | /**
|
395 | * Whether to include the _links field on the shallow references
|
396 | */
|
397 | includeLinks?: boolean;
|
398 | itemDescriptors?: TfvcItemDescriptor[];
|
399 | }
|
400 | /**
|
401 | * Metadata for a label.
|
402 | */
|
403 | export interface TfvcLabel extends TfvcLabelRef {
|
404 | /**
|
405 | * List of items.
|
406 | */
|
407 | items?: TfvcItem[];
|
408 | }
|
409 | /**
|
410 | * Metadata for a Label.
|
411 | */
|
412 | export interface TfvcLabelRef {
|
413 | /**
|
414 | * Collection of reference links.
|
415 | */
|
416 | _links?: any;
|
417 | /**
|
418 | * Label description.
|
419 | */
|
420 | description?: string;
|
421 | /**
|
422 | * Label Id.
|
423 | */
|
424 | id?: number;
|
425 | /**
|
426 | * Label scope.
|
427 | */
|
428 | labelScope?: string;
|
429 | /**
|
430 | * Last modified datetime for the label.
|
431 | */
|
432 | modifiedDate?: Date;
|
433 | /**
|
434 | * Label name.
|
435 | */
|
436 | name?: string;
|
437 | /**
|
438 | * Label owner.
|
439 | */
|
440 | owner?: VSSInterfaces.IdentityRef;
|
441 | /**
|
442 | * Label Url.
|
443 | */
|
444 | url?: string;
|
445 | }
|
446 | export interface TfvcLabelRequestData {
|
447 | /**
|
448 | * Whether to include the _links field on the shallow references
|
449 | */
|
450 | includeLinks?: boolean;
|
451 | itemLabelFilter?: string;
|
452 | labelScope?: string;
|
453 | maxItemCount?: number;
|
454 | name?: string;
|
455 | owner?: string;
|
456 | }
|
457 | /**
|
458 | * MappingFilter can be used to include or exclude specific paths.
|
459 | */
|
460 | export interface TfvcMappingFilter {
|
461 | /**
|
462 | * True if ServerPath should be excluded.
|
463 | */
|
464 | exclude?: boolean;
|
465 | /**
|
466 | * Path to be included or excluded.
|
467 | */
|
468 | serverPath?: string;
|
469 | }
|
470 | export interface TfvcMergeSource {
|
471 | /**
|
472 | * Indicates if this a rename source. If false, it is a merge source.
|
473 | */
|
474 | isRename?: boolean;
|
475 | /**
|
476 | * The server item of the merge source.
|
477 | */
|
478 | serverItem?: string;
|
479 | /**
|
480 | * Start of the version range.
|
481 | */
|
482 | versionFrom?: number;
|
483 | /**
|
484 | * End of the version range.
|
485 | */
|
486 | versionTo?: number;
|
487 | }
|
488 | /**
|
489 | * Policy failure information.
|
490 | */
|
491 | export interface TfvcPolicyFailureInfo {
|
492 | /**
|
493 | * Policy failure message.
|
494 | */
|
495 | message?: string;
|
496 | /**
|
497 | * Name of the policy that failed.
|
498 | */
|
499 | policyName?: string;
|
500 | }
|
501 | /**
|
502 | * Information on the policy override.
|
503 | */
|
504 | export interface TfvcPolicyOverrideInfo {
|
505 | /**
|
506 | * Overidden policy comment.
|
507 | */
|
508 | comment?: string;
|
509 | /**
|
510 | * Information on the failed policy that was overridden.
|
511 | */
|
512 | policyFailures?: TfvcPolicyFailureInfo[];
|
513 | }
|
514 | /**
|
515 | * This is the shallow branchref class.
|
516 | */
|
517 | export interface TfvcShallowBranchRef {
|
518 | /**
|
519 | * Path for the branch.
|
520 | */
|
521 | path?: string;
|
522 | }
|
523 | /**
|
524 | * Metadata for a shelveset.
|
525 | */
|
526 | export interface TfvcShelveset extends TfvcShelvesetRef {
|
527 | /**
|
528 | * List of changes.
|
529 | */
|
530 | changes?: TfvcChange[];
|
531 | /**
|
532 | * List of checkin notes.
|
533 | */
|
534 | notes?: CheckinNote[];
|
535 | /**
|
536 | * Policy override information if applicable.
|
537 | */
|
538 | policyOverride?: TfvcPolicyOverrideInfo;
|
539 | /**
|
540 | * List of associated workitems.
|
541 | */
|
542 | workItems?: AssociatedWorkItem[];
|
543 | }
|
544 | /**
|
545 | * Metadata for a shallow shelveset.
|
546 | */
|
547 | export interface TfvcShelvesetRef {
|
548 | /**
|
549 | * List of reference links for the shelveset.
|
550 | */
|
551 | _links?: any;
|
552 | /**
|
553 | * Shelveset comment.
|
554 | */
|
555 | comment?: string;
|
556 | /**
|
557 | * Shelveset comment truncated as applicable.
|
558 | */
|
559 | commentTruncated?: boolean;
|
560 | /**
|
561 | * Shelveset create date.
|
562 | */
|
563 | createdDate?: Date;
|
564 | /**
|
565 | * Shelveset Id.
|
566 | */
|
567 | id?: string;
|
568 | /**
|
569 | * Shelveset name.
|
570 | */
|
571 | name?: string;
|
572 | /**
|
573 | * Shelveset Owner.
|
574 | */
|
575 | owner?: VSSInterfaces.IdentityRef;
|
576 | /**
|
577 | * Shelveset Url.
|
578 | */
|
579 | url?: string;
|
580 | }
|
581 | export interface TfvcShelvesetRequestData {
|
582 | /**
|
583 | * Whether to include policyOverride and notes Only applies when requesting a single deep shelveset
|
584 | */
|
585 | includeDetails?: boolean;
|
586 | /**
|
587 | * Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset.
|
588 | */
|
589 | includeLinks?: boolean;
|
590 | /**
|
591 | * Whether to include workItems
|
592 | */
|
593 | includeWorkItems?: boolean;
|
594 | /**
|
595 | * Max number of changes to include
|
596 | */
|
597 | maxChangeCount?: number;
|
598 | /**
|
599 | * Max length of comment
|
600 | */
|
601 | maxCommentLength?: number;
|
602 | /**
|
603 | * Shelveset name
|
604 | */
|
605 | name?: string;
|
606 | /**
|
607 | * Owner's ID. Could be a name or a guid.
|
608 | */
|
609 | owner?: string;
|
610 | }
|
611 | export interface TfvcStatistics {
|
612 | /**
|
613 | * Id of the last changeset the stats are based on.
|
614 | */
|
615 | changesetId?: number;
|
616 | /**
|
617 | * Count of files at the requested scope.
|
618 | */
|
619 | fileCountTotal?: number;
|
620 | }
|
621 | /**
|
622 | * Version descriptor properties.
|
623 | */
|
624 | export interface TfvcVersionDescriptor {
|
625 | /**
|
626 | * Version object.
|
627 | */
|
628 | version?: string;
|
629 | versionOption?: TfvcVersionOption;
|
630 | versionType?: TfvcVersionType;
|
631 | }
|
632 | /**
|
633 | * Options for Version handling.
|
634 | */
|
635 | export declare enum TfvcVersionOption {
|
636 | /**
|
637 | * None.
|
638 | */
|
639 | None = 0,
|
640 | /**
|
641 | * Return the previous version.
|
642 | */
|
643 | Previous = 1,
|
644 | /**
|
645 | * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier.
|
646 | */
|
647 | UseRename = 2
|
648 | }
|
649 | /**
|
650 | * Type of Version object
|
651 | */
|
652 | export declare enum TfvcVersionType {
|
653 | /**
|
654 | * Version is treated as a ChangesetId.
|
655 | */
|
656 | None = 0,
|
657 | /**
|
658 | * Version is treated as a ChangesetId.
|
659 | */
|
660 | Changeset = 1,
|
661 | /**
|
662 | * Version is treated as a Shelveset name and owner.
|
663 | */
|
664 | Shelveset = 2,
|
665 | /**
|
666 | * Version is treated as a Change.
|
667 | */
|
668 | Change = 3,
|
669 | /**
|
670 | * Version is treated as a Date.
|
671 | */
|
672 | Date = 4,
|
673 | /**
|
674 | * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used.
|
675 | */
|
676 | Latest = 5,
|
677 | /**
|
678 | * Version will be treated as a Tip, if no version is defined latest will be used.
|
679 | */
|
680 | Tip = 6,
|
681 | /**
|
682 | * Version will be treated as a MergeSource.
|
683 | */
|
684 | MergeSource = 7
|
685 | }
|
686 | export declare enum VersionControlChangeType {
|
687 | None = 0,
|
688 | Add = 1,
|
689 | Edit = 2,
|
690 | Encoding = 4,
|
691 | Rename = 8,
|
692 | Delete = 16,
|
693 | Undelete = 32,
|
694 | Branch = 64,
|
695 | Merge = 128,
|
696 | Lock = 256,
|
697 | Rollback = 512,
|
698 | SourceRename = 1024,
|
699 | TargetRename = 2048,
|
700 | Property = 4096,
|
701 | All = 8191
|
702 | }
|
703 | export interface VersionControlProjectInfo {
|
704 | defaultSourceControlType?: TfsCoreInterfaces.SourceControlTypes;
|
705 | project?: TfsCoreInterfaces.TeamProjectReference;
|
706 | supportsGit?: boolean;
|
707 | supportsTFVC?: boolean;
|
708 | }
|
709 | export declare enum VersionControlRecursionType {
|
710 | /**
|
711 | * Only return the specified item.
|
712 | */
|
713 | None = 0,
|
714 | /**
|
715 | * Return the specified item and its direct children.
|
716 | */
|
717 | OneLevel = 1,
|
718 | /**
|
719 | * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder.
|
720 | */
|
721 | OneLevelPlusNestedEmptyFolders = 4,
|
722 | /**
|
723 | * Return specified item and all descendants
|
724 | */
|
725 | Full = 120
|
726 | }
|
727 | export declare var TypeInfo: {
|
728 | Change: any;
|
729 | GitRepository: any;
|
730 | GitRepositoryRef: any;
|
731 | ItemContent: any;
|
732 | ItemContentType: {
|
733 | enumValues: {
|
734 | rawText: number;
|
735 | base64Encoded: number;
|
736 | };
|
737 | };
|
738 | TfvcBranch: any;
|
739 | TfvcBranchRef: any;
|
740 | TfvcChange: any;
|
741 | TfvcChangeset: any;
|
742 | TfvcChangesetRef: any;
|
743 | TfvcItem: any;
|
744 | TfvcItemDescriptor: any;
|
745 | TfvcItemRequestData: any;
|
746 | TfvcLabel: any;
|
747 | TfvcLabelRef: any;
|
748 | TfvcShelveset: any;
|
749 | TfvcShelvesetRef: any;
|
750 | TfvcVersionDescriptor: any;
|
751 | TfvcVersionOption: {
|
752 | enumValues: {
|
753 | none: number;
|
754 | previous: number;
|
755 | useRename: number;
|
756 | };
|
757 | };
|
758 | TfvcVersionType: {
|
759 | enumValues: {
|
760 | none: number;
|
761 | changeset: number;
|
762 | shelveset: number;
|
763 | change: number;
|
764 | date: number;
|
765 | latest: number;
|
766 | tip: number;
|
767 | mergeSource: number;
|
768 | };
|
769 | };
|
770 | VersionControlChangeType: {
|
771 | enumValues: {
|
772 | none: number;
|
773 | add: number;
|
774 | edit: number;
|
775 | encoding: number;
|
776 | rename: number;
|
777 | delete: number;
|
778 | undelete: number;
|
779 | branch: number;
|
780 | merge: number;
|
781 | lock: number;
|
782 | rollback: number;
|
783 | sourceRename: number;
|
784 | targetRename: number;
|
785 | property: number;
|
786 | all: number;
|
787 | };
|
788 | };
|
789 | VersionControlProjectInfo: any;
|
790 | VersionControlRecursionType: {
|
791 | enumValues: {
|
792 | none: number;
|
793 | oneLevel: number;
|
794 | oneLevelPlusNestedEmptyFolders: number;
|
795 | full: number;
|
796 | };
|
797 | };
|
798 | };
|