1 | import GitInterfaces = require("../interfaces/GitInterfaces");
|
2 | /**
|
3 | * Defines a wiki repository which encapsulates the git repository backing the wiki.
|
4 | */
|
5 | export interface Wiki extends WikiCreateParameters {
|
6 | /**
|
7 | * The head commit associated with the git repository backing up the wiki.
|
8 | */
|
9 | headCommit?: string;
|
10 | /**
|
11 | * The ID of the wiki which is same as the ID of the Git repository that it is backed by.
|
12 | */
|
13 | id?: string;
|
14 | /**
|
15 | * The git repository that backs up the wiki.
|
16 | */
|
17 | repository?: GitInterfaces.GitRepository;
|
18 | }
|
19 | /**
|
20 | * Defines properties for wiki attachment file.
|
21 | */
|
22 | export interface WikiAttachment {
|
23 | /**
|
24 | * Name of the wiki attachment file.
|
25 | */
|
26 | name?: string;
|
27 | /**
|
28 | * Path of the wiki attachment file.
|
29 | */
|
30 | path?: string;
|
31 | }
|
32 | /**
|
33 | * Response contract for the Wiki Attachments API
|
34 | */
|
35 | export interface WikiAttachmentResponse {
|
36 | /**
|
37 | * Defines properties for wiki attachment file.
|
38 | */
|
39 | attachment?: WikiAttachment;
|
40 | /**
|
41 | * Contains the list of ETag values from the response header of the attachments API call. The first item in the list contains the version of the wiki attachment.
|
42 | */
|
43 | eTag?: string[];
|
44 | }
|
45 | /**
|
46 | * Base wiki creation parameters.
|
47 | */
|
48 | export interface WikiCreateBaseParameters {
|
49 | /**
|
50 | * Folder path inside repository which is shown as Wiki. Not required for ProjectWiki type.
|
51 | */
|
52 | mappedPath?: string;
|
53 | /**
|
54 | * Wiki name.
|
55 | */
|
56 | name?: string;
|
57 | /**
|
58 | * ID of the project in which the wiki is to be created.
|
59 | */
|
60 | projectId?: string;
|
61 | /**
|
62 | * ID of the git repository that backs up the wiki. Not required for ProjectWiki type.
|
63 | */
|
64 | repositoryId?: string;
|
65 | /**
|
66 | * Type of the wiki.
|
67 | */
|
68 | type?: WikiType;
|
69 | }
|
70 | /**
|
71 | * Wiki creations parameters.
|
72 | */
|
73 | export interface WikiCreateParameters {
|
74 | /**
|
75 | * Wiki name.
|
76 | */
|
77 | name?: string;
|
78 | /**
|
79 | * ID of the project in which the wiki is to be created.
|
80 | */
|
81 | projectId?: string;
|
82 | }
|
83 | /**
|
84 | * Wiki creation parameters.
|
85 | */
|
86 | export interface WikiCreateParametersV2 extends WikiCreateBaseParameters {
|
87 | /**
|
88 | * Version of the wiki. Not required for ProjectWiki type.
|
89 | */
|
90 | version?: GitInterfaces.GitVersionDescriptor;
|
91 | }
|
92 | /**
|
93 | * Defines a page in a wiki.
|
94 | */
|
95 | export interface WikiPage extends WikiPageCreateOrUpdateParameters {
|
96 | /**
|
97 | * Path of the git item corresponding to the wiki page stored in the backing Git repository.
|
98 | */
|
99 | gitItemPath?: string;
|
100 | /**
|
101 | * When present, permanent identifier for the wiki page
|
102 | */
|
103 | id?: number;
|
104 | /**
|
105 | * True if a page is non-conforming, i.e. 1) if the name doesn't match page naming standards. 2) if the page does not have a valid entry in the appropriate order file.
|
106 | */
|
107 | isNonConformant?: boolean;
|
108 | /**
|
109 | * True if this page has subpages under its path.
|
110 | */
|
111 | isParentPage?: boolean;
|
112 | /**
|
113 | * Order of the wiki page, relative to other pages in the same hierarchy level.
|
114 | */
|
115 | order?: number;
|
116 | /**
|
117 | * Path of the wiki page.
|
118 | */
|
119 | path?: string;
|
120 | /**
|
121 | * Remote web url to the wiki page.
|
122 | */
|
123 | remoteUrl?: string;
|
124 | /**
|
125 | * List of subpages of the current page.
|
126 | */
|
127 | subPages?: WikiPage[];
|
128 | /**
|
129 | * REST url for this wiki page.
|
130 | */
|
131 | url?: string;
|
132 | }
|
133 | /**
|
134 | * Contract encapsulating parameters for the page create or update operations.
|
135 | */
|
136 | export interface WikiPageCreateOrUpdateParameters {
|
137 | /**
|
138 | * Content of the wiki page.
|
139 | */
|
140 | content?: string;
|
141 | }
|
142 | /**
|
143 | * Defines a page with its metedata in a wiki.
|
144 | */
|
145 | export interface WikiPageDetail {
|
146 | /**
|
147 | * When present, permanent identifier for the wiki page
|
148 | */
|
149 | id?: number;
|
150 | /**
|
151 | * Path of the wiki page.
|
152 | */
|
153 | path?: string;
|
154 | /**
|
155 | * Path of the wiki page.
|
156 | */
|
157 | viewStats?: WikiPageStat[];
|
158 | }
|
159 | /**
|
160 | * Request contract for Wiki Page Move.
|
161 | */
|
162 | export interface WikiPageMove extends WikiPageMoveParameters {
|
163 | /**
|
164 | * Resultant page of this page move operation.
|
165 | */
|
166 | page?: WikiPage;
|
167 | }
|
168 | /**
|
169 | * Contract encapsulating parameters for the page move operation.
|
170 | */
|
171 | export interface WikiPageMoveParameters {
|
172 | /**
|
173 | * New order of the wiki page.
|
174 | */
|
175 | newOrder?: number;
|
176 | /**
|
177 | * New path of the wiki page.
|
178 | */
|
179 | newPath?: string;
|
180 | /**
|
181 | * Current path of the wiki page.
|
182 | */
|
183 | path?: string;
|
184 | }
|
185 | /**
|
186 | * Response contract for the Wiki Page Move API.
|
187 | */
|
188 | export interface WikiPageMoveResponse {
|
189 | /**
|
190 | * Contains the list of ETag values from the response header of the page move API call. The first item in the list contains the version of the wiki page subject to page move.
|
191 | */
|
192 | eTag?: string[];
|
193 | /**
|
194 | * Defines properties for wiki page move.
|
195 | */
|
196 | pageMove?: WikiPageMove;
|
197 | }
|
198 | /**
|
199 | * Response contract for the Wiki Pages PUT, PATCH and DELETE APIs.
|
200 | */
|
201 | export interface WikiPageResponse {
|
202 | /**
|
203 | * Contains the list of ETag values from the response header of the pages API call. The first item in the list contains the version of the wiki page.
|
204 | */
|
205 | eTag?: string[];
|
206 | /**
|
207 | * Defines properties for wiki page.
|
208 | */
|
209 | page?: WikiPage;
|
210 | }
|
211 | /**
|
212 | * Contract encapsulating parameters for the pages batch.
|
213 | */
|
214 | export interface WikiPagesBatchRequest {
|
215 | /**
|
216 | * If the list of page data returned is not complete, a continuation token to query next batch of pages is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of Wiki Page Data.
|
217 | */
|
218 | continuationToken?: string;
|
219 | /**
|
220 | * last N days from the current day for which page views is to be returned. It's inclusive of current day.
|
221 | */
|
222 | pageViewsForDays?: number;
|
223 | /**
|
224 | * Total count of pages on a wiki to return.
|
225 | */
|
226 | top?: number;
|
227 | }
|
228 | /**
|
229 | * Defines properties for wiki page stat.
|
230 | */
|
231 | export interface WikiPageStat {
|
232 | /**
|
233 | * the count of the stat for the Day
|
234 | */
|
235 | count?: number;
|
236 | /**
|
237 | * Day of the stat
|
238 | */
|
239 | day?: Date;
|
240 | }
|
241 | /**
|
242 | * Defines properties for wiki page view stats.
|
243 | */
|
244 | export interface WikiPageViewStats {
|
245 | /**
|
246 | * Wiki page view count.
|
247 | */
|
248 | count?: number;
|
249 | /**
|
250 | * Wiki page last viewed time.
|
251 | */
|
252 | lastViewedTime?: Date;
|
253 | /**
|
254 | * Wiki page path.
|
255 | */
|
256 | path?: string;
|
257 | }
|
258 | /**
|
259 | * Wiki types.
|
260 | */
|
261 | export declare enum WikiType {
|
262 | /**
|
263 | * Indicates that the wiki is provisioned for the team project
|
264 | */
|
265 | ProjectWiki = 0,
|
266 | /**
|
267 | * Indicates that the wiki is published from a git repository
|
268 | */
|
269 | CodeWiki = 1
|
270 | }
|
271 | export interface WikiUpdatedNotificationMessage {
|
272 | /**
|
273 | * Collection host Id for which the wikis are updated.
|
274 | */
|
275 | collectionId?: string;
|
276 | /**
|
277 | * Project Id for which the wikis are updated.
|
278 | */
|
279 | projectId?: string;
|
280 | /**
|
281 | * Repository Id associated with the particular wiki which is added, updated or deleted.
|
282 | */
|
283 | repositoryId?: string;
|
284 | }
|
285 | /**
|
286 | * Wiki update parameters.
|
287 | */
|
288 | export interface WikiUpdateParameters {
|
289 | /**
|
290 | * Name for wiki.
|
291 | */
|
292 | name?: string;
|
293 | /**
|
294 | * Versions of the wiki.
|
295 | */
|
296 | versions?: GitInterfaces.GitVersionDescriptor[];
|
297 | }
|
298 | /**
|
299 | * Defines a wiki resource.
|
300 | */
|
301 | export interface WikiV2 extends WikiCreateBaseParameters {
|
302 | /**
|
303 | * ID of the wiki.
|
304 | */
|
305 | id?: string;
|
306 | /**
|
307 | * Is wiki repository disabled
|
308 | */
|
309 | isDisabled?: boolean;
|
310 | /**
|
311 | * Properties of the wiki.
|
312 | */
|
313 | properties?: {
|
314 | [key: string]: string;
|
315 | };
|
316 | /**
|
317 | * Remote web url to the wiki.
|
318 | */
|
319 | remoteUrl?: string;
|
320 | /**
|
321 | * REST url for this wiki.
|
322 | */
|
323 | url?: string;
|
324 | /**
|
325 | * Versions of the wiki.
|
326 | */
|
327 | versions?: GitInterfaces.GitVersionDescriptor[];
|
328 | }
|
329 | export declare var TypeInfo: {
|
330 | Wiki: any;
|
331 | WikiCreateBaseParameters: any;
|
332 | WikiCreateParametersV2: any;
|
333 | WikiPageDetail: any;
|
334 | WikiPageStat: any;
|
335 | WikiPageViewStats: any;
|
336 | WikiType: {
|
337 | enumValues: {
|
338 | projectWiki: number;
|
339 | codeWiki: number;
|
340 | };
|
341 | };
|
342 | WikiUpdateParameters: any;
|
343 | WikiV2: any;
|
344 | };
|