UNPKG

20.6 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.InstalledExtensionStateIssueType = exports.ExtensionUpdateType = exports.ExtensionStateFlags = exports.ExtensionRequestUpdateType = exports.ExtensionRequestState = exports.ExtensionFlags = exports.ContributionQueryOptions = exports.ContributionPropertyType = exports.ContributionLicensingBehaviorType = exports.AcquisitionOperationType = exports.AcquisitionOperationState = exports.AcquisitionAssignmentType = void 0;
13const GalleryInterfaces = require("../interfaces/GalleryInterfaces");
14/**
15 * How the acquisition is assigned
16 */
17var AcquisitionAssignmentType;
18(function (AcquisitionAssignmentType) {
19 AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None";
20 /**
21 * Just assign for me
22 */
23 AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me";
24 /**
25 * Assign for all users in the account
26 */
27 AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All";
28})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {}));
29var AcquisitionOperationState;
30(function (AcquisitionOperationState) {
31 /**
32 * Not allowed to use this AcquisitionOperation
33 */
34 AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow";
35 /**
36 * Allowed to use this AcquisitionOperation
37 */
38 AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow";
39 /**
40 * Operation has already been completed and is no longer available
41 */
42 AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed";
43})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {}));
44/**
45 * Set of different types of operations that can be requested.
46 */
47var AcquisitionOperationType;
48(function (AcquisitionOperationType) {
49 /**
50 * Not yet used
51 */
52 AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get";
53 /**
54 * Install this extension into the host provided
55 */
56 AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install";
57 /**
58 * Buy licenses for this extension and install into the host provided
59 */
60 AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy";
61 /**
62 * Try this extension
63 */
64 AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try";
65 /**
66 * Request this extension for installation
67 */
68 AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request";
69 /**
70 * No action found
71 */
72 AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None";
73 /**
74 * Request admins for purchasing extension
75 */
76 AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest";
77})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {}));
78/**
79 * Represents different ways of including contributions based on licensing
80 */
81var ContributionLicensingBehaviorType;
82(function (ContributionLicensingBehaviorType) {
83 /**
84 * Default value - only include the contribution if the user is licensed for the extension
85 */
86 ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfLicensed"] = 0] = "OnlyIfLicensed";
87 /**
88 * Only include the contribution if the user is NOT licensed for the extension
89 */
90 ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfUnlicensed"] = 1] = "OnlyIfUnlicensed";
91 /**
92 * Always include the contribution regardless of whether or not the user is licensed for the extension
93 */
94 ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["AlwaysInclude"] = 2] = "AlwaysInclude";
95})(ContributionLicensingBehaviorType = exports.ContributionLicensingBehaviorType || (exports.ContributionLicensingBehaviorType = {}));
96/**
97 * The type of value used for a property
98 */
99var ContributionPropertyType;
100(function (ContributionPropertyType) {
101 /**
102 * Contribution type is unknown (value may be anything)
103 */
104 ContributionPropertyType[ContributionPropertyType["Unknown"] = 0] = "Unknown";
105 /**
106 * Value is a string
107 */
108 ContributionPropertyType[ContributionPropertyType["String"] = 1] = "String";
109 /**
110 * Value is a Uri
111 */
112 ContributionPropertyType[ContributionPropertyType["Uri"] = 2] = "Uri";
113 /**
114 * Value is a GUID
115 */
116 ContributionPropertyType[ContributionPropertyType["Guid"] = 4] = "Guid";
117 /**
118 * Value is True or False
119 */
120 ContributionPropertyType[ContributionPropertyType["Boolean"] = 8] = "Boolean";
121 /**
122 * Value is an integer
123 */
124 ContributionPropertyType[ContributionPropertyType["Integer"] = 16] = "Integer";
125 /**
126 * Value is a double
127 */
128 ContributionPropertyType[ContributionPropertyType["Double"] = 32] = "Double";
129 /**
130 * Value is a DateTime object
131 */
132 ContributionPropertyType[ContributionPropertyType["DateTime"] = 64] = "DateTime";
133 /**
134 * Value is a generic Dictionary/JObject/property bag
135 */
136 ContributionPropertyType[ContributionPropertyType["Dictionary"] = 128] = "Dictionary";
137 /**
138 * Value is an array
139 */
140 ContributionPropertyType[ContributionPropertyType["Array"] = 256] = "Array";
141 /**
142 * Value is an arbitrary/custom object
143 */
144 ContributionPropertyType[ContributionPropertyType["Object"] = 512] = "Object";
145})(ContributionPropertyType = exports.ContributionPropertyType || (exports.ContributionPropertyType = {}));
146/**
147 * Options that control the contributions to include in a query
148 */
149var ContributionQueryOptions;
150(function (ContributionQueryOptions) {
151 ContributionQueryOptions[ContributionQueryOptions["None"] = 0] = "None";
152 /**
153 * Include the direct contributions that have the ids queried.
154 */
155 ContributionQueryOptions[ContributionQueryOptions["IncludeSelf"] = 16] = "IncludeSelf";
156 /**
157 * Include the contributions that directly target the contributions queried.
158 */
159 ContributionQueryOptions[ContributionQueryOptions["IncludeChildren"] = 32] = "IncludeChildren";
160 /**
161 * Include the contributions from the entire sub-tree targeting the contributions queried.
162 */
163 ContributionQueryOptions[ContributionQueryOptions["IncludeSubTree"] = 96] = "IncludeSubTree";
164 /**
165 * Include the contribution being queried as well as all contributions that target them recursively.
166 */
167 ContributionQueryOptions[ContributionQueryOptions["IncludeAll"] = 112] = "IncludeAll";
168 /**
169 * Some callers may want the entire tree back without constraint evaluation being performed.
170 */
171 ContributionQueryOptions[ContributionQueryOptions["IgnoreConstraints"] = 256] = "IgnoreConstraints";
172})(ContributionQueryOptions = exports.ContributionQueryOptions || (exports.ContributionQueryOptions = {}));
173/**
174 * Set of flags applied to extensions that are relevant to contribution consumers
175 */
176var ExtensionFlags;
177(function (ExtensionFlags) {
178 /**
179 * A built-in extension is installed for all VSTS accounts by default
180 */
181 ExtensionFlags[ExtensionFlags["BuiltIn"] = 1] = "BuiltIn";
182 /**
183 * The extension comes from a fully-trusted publisher
184 */
185 ExtensionFlags[ExtensionFlags["Trusted"] = 2] = "Trusted";
186})(ExtensionFlags = exports.ExtensionFlags || (exports.ExtensionFlags = {}));
187/**
188 * Represents the state of an extension request
189 */
190var ExtensionRequestState;
191(function (ExtensionRequestState) {
192 /**
193 * The request has been opened, but not yet responded to
194 */
195 ExtensionRequestState[ExtensionRequestState["Open"] = 0] = "Open";
196 /**
197 * The request was accepted (extension installed or license assigned)
198 */
199 ExtensionRequestState[ExtensionRequestState["Accepted"] = 1] = "Accepted";
200 /**
201 * The request was rejected (extension not installed or license not assigned)
202 */
203 ExtensionRequestState[ExtensionRequestState["Rejected"] = 2] = "Rejected";
204})(ExtensionRequestState = exports.ExtensionRequestState || (exports.ExtensionRequestState = {}));
205var ExtensionRequestUpdateType;
206(function (ExtensionRequestUpdateType) {
207 ExtensionRequestUpdateType[ExtensionRequestUpdateType["Created"] = 1] = "Created";
208 ExtensionRequestUpdateType[ExtensionRequestUpdateType["Approved"] = 2] = "Approved";
209 ExtensionRequestUpdateType[ExtensionRequestUpdateType["Rejected"] = 3] = "Rejected";
210 ExtensionRequestUpdateType[ExtensionRequestUpdateType["Deleted"] = 4] = "Deleted";
211})(ExtensionRequestUpdateType = exports.ExtensionRequestUpdateType || (exports.ExtensionRequestUpdateType = {}));
212/**
213 * States of an extension Note: If you add value to this enum, you need to do 2 other things. First add the back compat enum in value src\Vssf\Sdk\Server\Contributions\InstalledExtensionMessage.cs. Second, you can not send the new value on the message bus. You need to remove it from the message bus event prior to being sent.
214 */
215var ExtensionStateFlags;
216(function (ExtensionStateFlags) {
217 /**
218 * No flags set
219 */
220 ExtensionStateFlags[ExtensionStateFlags["None"] = 0] = "None";
221 /**
222 * Extension is disabled
223 */
224 ExtensionStateFlags[ExtensionStateFlags["Disabled"] = 1] = "Disabled";
225 /**
226 * Extension is a built in
227 */
228 ExtensionStateFlags[ExtensionStateFlags["BuiltIn"] = 2] = "BuiltIn";
229 /**
230 * Extension has multiple versions
231 */
232 ExtensionStateFlags[ExtensionStateFlags["MultiVersion"] = 4] = "MultiVersion";
233 /**
234 * Extension is not installed. This is for builtin extensions only and can not otherwise be set.
235 */
236 ExtensionStateFlags[ExtensionStateFlags["UnInstalled"] = 8] = "UnInstalled";
237 /**
238 * Error performing version check
239 */
240 ExtensionStateFlags[ExtensionStateFlags["VersionCheckError"] = 16] = "VersionCheckError";
241 /**
242 * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted.
243 */
244 ExtensionStateFlags[ExtensionStateFlags["Trusted"] = 32] = "Trusted";
245 /**
246 * Extension is currently in an error state
247 */
248 ExtensionStateFlags[ExtensionStateFlags["Error"] = 64] = "Error";
249 /**
250 * Extension scopes have changed and the extension requires re-authorization
251 */
252 ExtensionStateFlags[ExtensionStateFlags["NeedsReauthorization"] = 128] = "NeedsReauthorization";
253 /**
254 * Error performing auto-upgrade. For example, if the new version has demands not supported the extension cannot be auto-upgraded.
255 */
256 ExtensionStateFlags[ExtensionStateFlags["AutoUpgradeError"] = 256] = "AutoUpgradeError";
257 /**
258 * Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported.
259 */
260 ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning";
261})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {}));
262var ExtensionUpdateType;
263(function (ExtensionUpdateType) {
264 ExtensionUpdateType[ExtensionUpdateType["Installed"] = 1] = "Installed";
265 ExtensionUpdateType[ExtensionUpdateType["Uninstalled"] = 2] = "Uninstalled";
266 ExtensionUpdateType[ExtensionUpdateType["Enabled"] = 3] = "Enabled";
267 ExtensionUpdateType[ExtensionUpdateType["Disabled"] = 4] = "Disabled";
268 ExtensionUpdateType[ExtensionUpdateType["VersionUpdated"] = 5] = "VersionUpdated";
269 ExtensionUpdateType[ExtensionUpdateType["ActionRequired"] = 6] = "ActionRequired";
270 ExtensionUpdateType[ExtensionUpdateType["ActionResolved"] = 7] = "ActionResolved";
271})(ExtensionUpdateType = exports.ExtensionUpdateType || (exports.ExtensionUpdateType = {}));
272/**
273 * Installation issue type (Warning, Error)
274 */
275var InstalledExtensionStateIssueType;
276(function (InstalledExtensionStateIssueType) {
277 /**
278 * Represents an installation warning, for example an implicit demand not supported
279 */
280 InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Warning"] = 0] = "Warning";
281 /**
282 * Represents an installation error, for example an explicit demand not supported
283 */
284 InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Error"] = 1] = "Error";
285})(InstalledExtensionStateIssueType = exports.InstalledExtensionStateIssueType || (exports.InstalledExtensionStateIssueType = {}));
286exports.TypeInfo = {
287 AcquisitionAssignmentType: {
288 enumValues: {
289 "none": 0,
290 "me": 1,
291 "all": 2
292 }
293 },
294 AcquisitionOperation: {},
295 AcquisitionOperationState: {
296 enumValues: {
297 "disallow": 0,
298 "allow": 1,
299 "completed": 3
300 }
301 },
302 AcquisitionOperationType: {
303 enumValues: {
304 "get": 0,
305 "install": 1,
306 "buy": 2,
307 "try": 3,
308 "request": 4,
309 "none": 5,
310 "purchaseRequest": 6
311 }
312 },
313 AcquisitionOptions: {},
314 ContributionLicensingBehaviorType: {
315 enumValues: {
316 "onlyIfLicensed": 0,
317 "onlyIfUnlicensed": 1,
318 "alwaysInclude": 2
319 }
320 },
321 ContributionNodeQuery: {},
322 ContributionPropertyDescription: {},
323 ContributionPropertyType: {
324 enumValues: {
325 "unknown": 0,
326 "string": 1,
327 "uri": 2,
328 "guid": 4,
329 "boolean": 8,
330 "integer": 16,
331 "double": 32,
332 "dateTime": 64,
333 "dictionary": 128,
334 "array": 256,
335 "object": 512
336 }
337 },
338 ContributionQueryOptions: {
339 enumValues: {
340 "none": 0,
341 "includeSelf": 16,
342 "includeChildren": 32,
343 "includeSubTree": 96,
344 "includeAll": 112,
345 "ignoreConstraints": 256
346 }
347 },
348 ContributionType: {},
349 ExtensionAcquisitionRequest: {},
350 ExtensionAuditLog: {},
351 ExtensionAuditLogEntry: {},
352 ExtensionEvent: {},
353 ExtensionFlags: {
354 enumValues: {
355 "builtIn": 1,
356 "trusted": 2
357 }
358 },
359 ExtensionLicensing: {},
360 ExtensionManifest: {},
361 ExtensionRequest: {},
362 ExtensionRequestEvent: {},
363 ExtensionRequestsEvent: {},
364 ExtensionRequestState: {
365 enumValues: {
366 "open": 0,
367 "accepted": 1,
368 "rejected": 2
369 }
370 },
371 ExtensionRequestUpdateType: {
372 enumValues: {
373 "created": 1,
374 "approved": 2,
375 "rejected": 3,
376 "deleted": 4
377 }
378 },
379 ExtensionState: {},
380 ExtensionStateFlags: {
381 enumValues: {
382 "none": 0,
383 "disabled": 1,
384 "builtIn": 2,
385 "multiVersion": 4,
386 "unInstalled": 8,
387 "versionCheckError": 16,
388 "trusted": 32,
389 "error": 64,
390 "needsReauthorization": 128,
391 "autoUpgradeError": 256,
392 "warning": 512
393 }
394 },
395 ExtensionUpdateType: {
396 enumValues: {
397 "installed": 1,
398 "uninstalled": 2,
399 "enabled": 3,
400 "disabled": 4,
401 "versionUpdated": 5,
402 "actionRequired": 6,
403 "actionResolved": 7
404 }
405 },
406 InstalledExtension: {},
407 InstalledExtensionState: {},
408 InstalledExtensionStateIssue: {},
409 InstalledExtensionStateIssueType: {
410 enumValues: {
411 "warning": 0,
412 "error": 1
413 }
414 },
415 LicensingOverride: {},
416 RequestedExtension: {},
417};
418exports.TypeInfo.AcquisitionOperation.fields = {
419 operationState: {
420 enumType: exports.TypeInfo.AcquisitionOperationState
421 },
422 operationType: {
423 enumType: exports.TypeInfo.AcquisitionOperationType
424 }
425};
426exports.TypeInfo.AcquisitionOptions.fields = {
427 defaultOperation: {
428 typeInfo: exports.TypeInfo.AcquisitionOperation
429 },
430 operations: {
431 isArray: true,
432 typeInfo: exports.TypeInfo.AcquisitionOperation
433 }
434};
435exports.TypeInfo.ContributionNodeQuery.fields = {
436 queryOptions: {
437 enumType: exports.TypeInfo.ContributionQueryOptions
438 }
439};
440exports.TypeInfo.ContributionPropertyDescription.fields = {
441 type: {
442 enumType: exports.TypeInfo.ContributionPropertyType
443 }
444};
445exports.TypeInfo.ContributionType.fields = {
446 properties: {
447 isDictionary: true,
448 dictionaryValueTypeInfo: exports.TypeInfo.ContributionPropertyDescription
449 }
450};
451exports.TypeInfo.ExtensionAcquisitionRequest.fields = {
452 assignmentType: {
453 enumType: exports.TypeInfo.AcquisitionAssignmentType
454 },
455 operationType: {
456 enumType: exports.TypeInfo.AcquisitionOperationType
457 }
458};
459exports.TypeInfo.ExtensionAuditLog.fields = {
460 entries: {
461 isArray: true,
462 typeInfo: exports.TypeInfo.ExtensionAuditLogEntry
463 }
464};
465exports.TypeInfo.ExtensionAuditLogEntry.fields = {
466 auditDate: {
467 isDate: true,
468 }
469};
470exports.TypeInfo.ExtensionEvent.fields = {
471 extension: {
472 typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension
473 },
474 updateType: {
475 enumType: exports.TypeInfo.ExtensionUpdateType
476 }
477};
478exports.TypeInfo.ExtensionLicensing.fields = {
479 overrides: {
480 isArray: true,
481 typeInfo: exports.TypeInfo.LicensingOverride
482 }
483};
484exports.TypeInfo.ExtensionManifest.fields = {
485 contributionTypes: {
486 isArray: true,
487 typeInfo: exports.TypeInfo.ContributionType
488 },
489 licensing: {
490 typeInfo: exports.TypeInfo.ExtensionLicensing
491 }
492};
493exports.TypeInfo.ExtensionRequest.fields = {
494 requestDate: {
495 isDate: true,
496 },
497 requestState: {
498 enumType: exports.TypeInfo.ExtensionRequestState
499 },
500 resolveDate: {
501 isDate: true,
502 }
503};
504exports.TypeInfo.ExtensionRequestEvent.fields = {
505 extension: {
506 typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension
507 },
508 request: {
509 typeInfo: exports.TypeInfo.ExtensionRequest
510 },
511 updateType: {
512 enumType: exports.TypeInfo.ExtensionRequestUpdateType
513 }
514};
515exports.TypeInfo.ExtensionRequestsEvent.fields = {
516 extension: {
517 typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension
518 },
519 requests: {
520 isArray: true,
521 typeInfo: exports.TypeInfo.ExtensionRequest
522 },
523 updateType: {
524 enumType: exports.TypeInfo.ExtensionRequestUpdateType
525 }
526};
527exports.TypeInfo.ExtensionState.fields = {
528 flags: {
529 enumType: exports.TypeInfo.ExtensionStateFlags
530 },
531 installationIssues: {
532 isArray: true,
533 typeInfo: exports.TypeInfo.InstalledExtensionStateIssue
534 },
535 lastUpdated: {
536 isDate: true,
537 },
538 lastVersionCheck: {
539 isDate: true,
540 }
541};
542exports.TypeInfo.InstalledExtension.fields = {
543 contributionTypes: {
544 isArray: true,
545 typeInfo: exports.TypeInfo.ContributionType
546 },
547 flags: {
548 enumType: exports.TypeInfo.ExtensionFlags
549 },
550 installState: {
551 typeInfo: exports.TypeInfo.InstalledExtensionState
552 },
553 lastPublished: {
554 isDate: true,
555 },
556 licensing: {
557 typeInfo: exports.TypeInfo.ExtensionLicensing
558 }
559};
560exports.TypeInfo.InstalledExtensionState.fields = {
561 flags: {
562 enumType: exports.TypeInfo.ExtensionStateFlags
563 },
564 installationIssues: {
565 isArray: true,
566 typeInfo: exports.TypeInfo.InstalledExtensionStateIssue
567 },
568 lastUpdated: {
569 isDate: true,
570 }
571};
572exports.TypeInfo.InstalledExtensionStateIssue.fields = {
573 type: {
574 enumType: exports.TypeInfo.InstalledExtensionStateIssueType
575 }
576};
577exports.TypeInfo.LicensingOverride.fields = {
578 behavior: {
579 enumType: exports.TypeInfo.ContributionLicensingBehaviorType
580 }
581};
582exports.TypeInfo.RequestedExtension.fields = {
583 extensionRequests: {
584 isArray: true,
585 typeInfo: exports.TypeInfo.ExtensionRequest
586 }
587};