1 | import GalleryInterfaces = require("../interfaces/GalleryInterfaces");
|
2 | import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
|
3 | /**
|
4 | * How the acquisition is assigned
|
5 | */
|
6 | export declare enum AcquisitionAssignmentType {
|
7 | None = 0,
|
8 | /**
|
9 | * Just assign for me
|
10 | */
|
11 | Me = 1,
|
12 | /**
|
13 | * Assign for all users in the account
|
14 | */
|
15 | All = 2
|
16 | }
|
17 | export interface AcquisitionOperation {
|
18 | /**
|
19 | * State of the AcquisitionOperation for the current user
|
20 | */
|
21 | operationState?: AcquisitionOperationState;
|
22 | /**
|
23 | * AcquisitionOperationType: install, request, buy, etc...
|
24 | */
|
25 | operationType?: AcquisitionOperationType;
|
26 | /**
|
27 | * Optional reason to justify current state. Typically used with Disallow state.
|
28 | */
|
29 | reason?: string;
|
30 | /**
|
31 | * List of reasons indicating why the operation is not allowed.
|
32 | */
|
33 | reasons?: AcquisitionOperationDisallowReason[];
|
34 | }
|
35 | export interface AcquisitionOperationDisallowReason {
|
36 | /**
|
37 | * User-friendly message clarifying the reason for disallowance
|
38 | */
|
39 | message?: string;
|
40 | /**
|
41 | * Type of reason for disallowance - AlreadyInstalled, UnresolvedDemand, etc.
|
42 | */
|
43 | type?: string;
|
44 | }
|
45 | export declare enum AcquisitionOperationState {
|
46 | /**
|
47 | * Not allowed to use this AcquisitionOperation
|
48 | */
|
49 | Disallow = 0,
|
50 | /**
|
51 | * Allowed to use this AcquisitionOperation
|
52 | */
|
53 | Allow = 1,
|
54 | /**
|
55 | * Operation has already been completed and is no longer available
|
56 | */
|
57 | Completed = 3
|
58 | }
|
59 | /**
|
60 | * Set of different types of operations that can be requested.
|
61 | */
|
62 | export declare enum AcquisitionOperationType {
|
63 | /**
|
64 | * Not yet used
|
65 | */
|
66 | Get = 0,
|
67 | /**
|
68 | * Install this extension into the host provided
|
69 | */
|
70 | Install = 1,
|
71 | /**
|
72 | * Buy licenses for this extension and install into the host provided
|
73 | */
|
74 | Buy = 2,
|
75 | /**
|
76 | * Try this extension
|
77 | */
|
78 | Try = 3,
|
79 | /**
|
80 | * Request this extension for installation
|
81 | */
|
82 | Request = 4,
|
83 | /**
|
84 | * No action found
|
85 | */
|
86 | None = 5,
|
87 | /**
|
88 | * Request admins for purchasing extension
|
89 | */
|
90 | PurchaseRequest = 6
|
91 | }
|
92 | /**
|
93 | * Market item acquisition options (install, buy, etc) for an installation target.
|
94 | */
|
95 | export interface AcquisitionOptions {
|
96 | /**
|
97 | * Default Operation for the ItemId in this target
|
98 | */
|
99 | defaultOperation?: AcquisitionOperation;
|
100 | /**
|
101 | * The item id that this options refer to
|
102 | */
|
103 | itemId?: string;
|
104 | /**
|
105 | * Operations allowed for the ItemId in this target
|
106 | */
|
107 | operations?: AcquisitionOperation[];
|
108 | /**
|
109 | * Additional properties which can be added to the request.
|
110 | */
|
111 | properties?: any;
|
112 | /**
|
113 | * The target that this options refer to
|
114 | */
|
115 | target?: string;
|
116 | }
|
117 | /**
|
118 | * Representation of a ContributionNode that can be used for serialized to clients.
|
119 | */
|
120 | export interface ClientContribution {
|
121 | /**
|
122 | * Description of the contribution/type
|
123 | */
|
124 | description?: string;
|
125 | /**
|
126 | * Fully qualified identifier of the contribution/type
|
127 | */
|
128 | id?: string;
|
129 | /**
|
130 | * Includes is a set of contributions that should have this contribution included in their targets list.
|
131 | */
|
132 | includes?: string[];
|
133 | /**
|
134 | * Properties/attributes of this contribution
|
135 | */
|
136 | properties?: any;
|
137 | /**
|
138 | * The ids of the contribution(s) that this contribution targets. (parent contributions)
|
139 | */
|
140 | targets?: string[];
|
141 | /**
|
142 | * Id of the Contribution Type
|
143 | */
|
144 | type?: string;
|
145 | }
|
146 | /**
|
147 | * Representation of a ContributionNode that can be used for serialized to clients.
|
148 | */
|
149 | export interface ClientContributionNode {
|
150 | /**
|
151 | * List of ids for contributions which are children to the current contribution.
|
152 | */
|
153 | children?: string[];
|
154 | /**
|
155 | * Contribution associated with this node.
|
156 | */
|
157 | contribution?: ClientContribution;
|
158 | /**
|
159 | * List of ids for contributions which are parents to the current contribution.
|
160 | */
|
161 | parents?: string[];
|
162 | }
|
163 | export interface ClientContributionProviderDetails {
|
164 | /**
|
165 | * Friendly name for the provider.
|
166 | */
|
167 | displayName?: string;
|
168 | /**
|
169 | * Unique identifier for this provider. The provider name can be used to cache the contribution data and refer back to it when looking for changes
|
170 | */
|
171 | name?: string;
|
172 | /**
|
173 | * Properties associated with the provider
|
174 | */
|
175 | properties?: {
|
176 | [key: string]: string;
|
177 | };
|
178 | /**
|
179 | * Version of contributions associated with this contribution provider.
|
180 | */
|
181 | version?: string;
|
182 | }
|
183 | /**
|
184 | * A client data provider are the details needed to make the data provider request from the client.
|
185 | */
|
186 | export interface ClientDataProviderQuery extends DataProviderQuery {
|
187 | /**
|
188 | * The Id of the service instance type that should be communicated with in order to resolve the data providers from the client given the query values.
|
189 | */
|
190 | queryServiceInstanceType?: string;
|
191 | }
|
192 | /**
|
193 | * An individual contribution made by an extension
|
194 | */
|
195 | export interface Contribution extends ContributionBase {
|
196 | /**
|
197 | * List of constraints (filters) that should be applied to the availability of this contribution
|
198 | */
|
199 | constraints?: ContributionConstraint[];
|
200 | /**
|
201 | * Includes is a set of contributions that should have this contribution included in their targets list.
|
202 | */
|
203 | includes?: string[];
|
204 | /**
|
205 | * Properties/attributes of this contribution
|
206 | */
|
207 | properties?: any;
|
208 | /**
|
209 | * List of demanded claims in order for the user to see this contribution (like anonymous, public, member...).
|
210 | */
|
211 | restrictedTo?: string[];
|
212 | /**
|
213 | * The ids of the contribution(s) that this contribution targets. (parent contributions)
|
214 | */
|
215 | targets?: string[];
|
216 | /**
|
217 | * Id of the Contribution Type
|
218 | */
|
219 | type?: string;
|
220 | }
|
221 | /**
|
222 | * Base class shared by contributions and contribution types
|
223 | */
|
224 | export interface ContributionBase {
|
225 | /**
|
226 | * Description of the contribution/type
|
227 | */
|
228 | description?: string;
|
229 | /**
|
230 | * Fully qualified identifier of the contribution/type
|
231 | */
|
232 | id?: string;
|
233 | /**
|
234 | * VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this.
|
235 | */
|
236 | visibleTo?: string[];
|
237 | }
|
238 | /**
|
239 | * Specifies a constraint that can be used to dynamically include/exclude a given contribution
|
240 | */
|
241 | export interface ContributionConstraint {
|
242 | /**
|
243 | * An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included).
|
244 | */
|
245 | group?: number;
|
246 | /**
|
247 | * Fully qualified identifier of a shared constraint
|
248 | */
|
249 | id?: string;
|
250 | /**
|
251 | * If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true)
|
252 | */
|
253 | inverse?: boolean;
|
254 | /**
|
255 | * Name of the IContributionFilter plugin
|
256 | */
|
257 | name?: string;
|
258 | /**
|
259 | * Properties that are fed to the contribution filter class
|
260 | */
|
261 | properties?: any;
|
262 | /**
|
263 | * Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied.
|
264 | */
|
265 | relationships?: string[];
|
266 | }
|
267 | /**
|
268 | * Represents different ways of including contributions based on licensing
|
269 | */
|
270 | export declare enum ContributionLicensingBehaviorType {
|
271 | /**
|
272 | * Default value - only include the contribution if the user is licensed for the extension
|
273 | */
|
274 | OnlyIfLicensed = 0,
|
275 | /**
|
276 | * Only include the contribution if the user is NOT licensed for the extension
|
277 | */
|
278 | OnlyIfUnlicensed = 1,
|
279 | /**
|
280 | * Always include the contribution regardless of whether or not the user is licensed for the extension
|
281 | */
|
282 | AlwaysInclude = 2
|
283 | }
|
284 | /**
|
285 | * A query that can be issued for contribution nodes
|
286 | */
|
287 | export interface ContributionNodeQuery {
|
288 | /**
|
289 | * The contribution ids of the nodes to find.
|
290 | */
|
291 | contributionIds?: string[];
|
292 | /**
|
293 | * Contextual information that can be leveraged by contribution constraints
|
294 | */
|
295 | dataProviderContext?: DataProviderContext;
|
296 | /**
|
297 | * Indicator if contribution provider details should be included in the result.
|
298 | */
|
299 | includeProviderDetails?: boolean;
|
300 | /**
|
301 | * Query options tpo be used when fetching ContributionNodes
|
302 | */
|
303 | queryOptions?: ContributionQueryOptions;
|
304 | }
|
305 | /**
|
306 | * Result of a contribution node query. Wraps the resulting contribution nodes and provider details.
|
307 | */
|
308 | export interface ContributionNodeQueryResult {
|
309 | /**
|
310 | * Map of contribution ids to corresponding node.
|
311 | */
|
312 | nodes?: {
|
313 | [key: string]: ClientContributionNode;
|
314 | };
|
315 | /**
|
316 | * Map of provider ids to the corresponding provider details object.
|
317 | */
|
318 | providerDetails?: {
|
319 | [key: string]: ClientContributionProviderDetails;
|
320 | };
|
321 | }
|
322 | /**
|
323 | * Description about a property of a contribution type
|
324 | */
|
325 | export interface ContributionPropertyDescription {
|
326 | /**
|
327 | * Description of the property
|
328 | */
|
329 | description?: string;
|
330 | /**
|
331 | * Name of the property
|
332 | */
|
333 | name?: string;
|
334 | /**
|
335 | * True if this property is required
|
336 | */
|
337 | required?: boolean;
|
338 | /**
|
339 | * The type of value used for this property
|
340 | */
|
341 | type?: ContributionPropertyType;
|
342 | }
|
343 | /**
|
344 | * The type of value used for a property
|
345 | */
|
346 | export declare enum ContributionPropertyType {
|
347 | /**
|
348 | * Contribution type is unknown (value may be anything)
|
349 | */
|
350 | Unknown = 0,
|
351 | /**
|
352 | * Value is a string
|
353 | */
|
354 | String = 1,
|
355 | /**
|
356 | * Value is a Uri
|
357 | */
|
358 | Uri = 2,
|
359 | /**
|
360 | * Value is a GUID
|
361 | */
|
362 | Guid = 4,
|
363 | /**
|
364 | * Value is True or False
|
365 | */
|
366 | Boolean = 8,
|
367 | /**
|
368 | * Value is an integer
|
369 | */
|
370 | Integer = 16,
|
371 | /**
|
372 | * Value is a double
|
373 | */
|
374 | Double = 32,
|
375 | /**
|
376 | * Value is a DateTime object
|
377 | */
|
378 | DateTime = 64,
|
379 | /**
|
380 | * Value is a generic Dictionary/JObject/property bag
|
381 | */
|
382 | Dictionary = 128,
|
383 | /**
|
384 | * Value is an array
|
385 | */
|
386 | Array = 256,
|
387 | /**
|
388 | * Value is an arbitrary/custom object
|
389 | */
|
390 | Object = 512
|
391 | }
|
392 | export interface ContributionProviderDetails {
|
393 | /**
|
394 | * Friendly name for the provider.
|
395 | */
|
396 | displayName?: string;
|
397 | /**
|
398 | * Unique identifier for this provider. The provider name can be used to cache the contribution data and refer back to it when looking for changes
|
399 | */
|
400 | name?: string;
|
401 | /**
|
402 | * Properties associated with the provider
|
403 | */
|
404 | properties?: {
|
405 | [key: string]: string;
|
406 | };
|
407 | /**
|
408 | * Version of contributions associated with this contribution provider.
|
409 | */
|
410 | version?: string;
|
411 | }
|
412 | /**
|
413 | * Options that control the contributions to include in a query
|
414 | */
|
415 | export declare enum ContributionQueryOptions {
|
416 | None = 0,
|
417 | /**
|
418 | * Include the direct contributions that have the ids queried.
|
419 | */
|
420 | IncludeSelf = 16,
|
421 | /**
|
422 | * Include the contributions that directly target the contributions queried.
|
423 | */
|
424 | IncludeChildren = 32,
|
425 | /**
|
426 | * Include the contributions from the entire sub-tree targeting the contributions queried.
|
427 | */
|
428 | IncludeSubTree = 96,
|
429 | /**
|
430 | * Include the contribution being queried as well as all contributions that target them recursively.
|
431 | */
|
432 | IncludeAll = 112,
|
433 | /**
|
434 | * Some callers may want the entire tree back without constraint evaluation being performed.
|
435 | */
|
436 | IgnoreConstraints = 256
|
437 | }
|
438 | /**
|
439 | * A contribution type, given by a json schema
|
440 | */
|
441 | export interface ContributionType extends ContributionBase {
|
442 | /**
|
443 | * Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type. NOTE: Only TrustedPartners are allowed to specify indexed contribution types.
|
444 | */
|
445 | indexed?: boolean;
|
446 | /**
|
447 | * Friendly name of the contribution/type
|
448 | */
|
449 | name?: string;
|
450 | /**
|
451 | * Describes the allowed properties for this contribution type
|
452 | */
|
453 | properties?: {
|
454 | [key: string]: ContributionPropertyDescription;
|
455 | };
|
456 | }
|
457 | /**
|
458 | * Contextual information that data providers can examine when populating their data
|
459 | */
|
460 | export interface DataProviderContext {
|
461 | /**
|
462 | * Generic property bag that contains context-specific properties that data providers can use when populating their data dictionary
|
463 | */
|
464 | properties?: {
|
465 | [key: string]: any;
|
466 | };
|
467 | }
|
468 | export interface DataProviderExceptionDetails {
|
469 | /**
|
470 | * The type of the exception that was thrown.
|
471 | */
|
472 | exceptionType?: string;
|
473 | /**
|
474 | * Message that is associated with the exception.
|
475 | */
|
476 | message?: string;
|
477 | /**
|
478 | * The StackTrace from the exception turned into a string.
|
479 | */
|
480 | stackTrace?: string;
|
481 | }
|
482 | /**
|
483 | * A query that can be issued for data provider data
|
484 | */
|
485 | export interface DataProviderQuery {
|
486 | /**
|
487 | * Contextual information to pass to the data providers
|
488 | */
|
489 | context?: DataProviderContext;
|
490 | /**
|
491 | * The contribution ids of the data providers to resolve
|
492 | */
|
493 | contributionIds?: string[];
|
494 | }
|
495 | /**
|
496 | * Result structure from calls to GetDataProviderData
|
497 | */
|
498 | export interface DataProviderResult {
|
499 | /**
|
500 | * This is the set of data providers that were requested, but either they were defined as client providers, or as remote providers that failed and may be retried by the client.
|
501 | */
|
502 | clientProviders?: {
|
503 | [key: string]: ClientDataProviderQuery;
|
504 | };
|
505 | /**
|
506 | * Property bag of data keyed off of the data provider contribution id
|
507 | */
|
508 | data?: {
|
509 | [key: string]: any;
|
510 | };
|
511 | /**
|
512 | * Set of exceptions that occurred resolving the data providers.
|
513 | */
|
514 | exceptions?: {
|
515 | [key: string]: DataProviderExceptionDetails;
|
516 | };
|
517 | /**
|
518 | * List of data providers resolved in the data-provider query
|
519 | */
|
520 | resolvedProviders?: ResolvedDataProvider[];
|
521 | /**
|
522 | * Scope name applied to this data provider result.
|
523 | */
|
524 | scopeName?: string;
|
525 | /**
|
526 | * Scope value applied to this data provider result.
|
527 | */
|
528 | scopeValue?: string;
|
529 | /**
|
530 | * Property bag of shared data that was contributed to by any of the individual data providers
|
531 | */
|
532 | sharedData?: {
|
533 | [key: string]: any;
|
534 | };
|
535 | }
|
536 | /**
|
537 | * Data bag that any data provider can contribute to. This shared dictionary is returned in the data provider result.
|
538 | */
|
539 | export interface DataProviderSharedData {
|
540 | }
|
541 | /**
|
542 | * Contract for handling the extension acquisition process
|
543 | */
|
544 | export interface ExtensionAcquisitionRequest {
|
545 | /**
|
546 | * How the item is being assigned
|
547 | */
|
548 | assignmentType?: AcquisitionAssignmentType;
|
549 | /**
|
550 | * The id of the subscription used for purchase
|
551 | */
|
552 | billingId?: string;
|
553 | /**
|
554 | * The marketplace id (publisherName.extensionName) for the item
|
555 | */
|
556 | itemId?: string;
|
557 | /**
|
558 | * The type of operation, such as install, request, purchase
|
559 | */
|
560 | operationType?: AcquisitionOperationType;
|
561 | /**
|
562 | * Additional properties which can be added to the request.
|
563 | */
|
564 | properties?: any;
|
565 | /**
|
566 | * How many licenses should be purchased
|
567 | */
|
568 | quantity?: number;
|
569 | }
|
570 | /**
|
571 | * Audit log for an extension
|
572 | */
|
573 | export interface ExtensionAuditLog {
|
574 | /**
|
575 | * Collection of audit log entries
|
576 | */
|
577 | entries?: ExtensionAuditLogEntry[];
|
578 | /**
|
579 | * Extension that the change was made for
|
580 | */
|
581 | extensionName?: string;
|
582 | /**
|
583 | * Publisher that the extension is part of
|
584 | */
|
585 | publisherName?: string;
|
586 | }
|
587 | /**
|
588 | * An audit log entry for an extension
|
589 | */
|
590 | export interface ExtensionAuditLogEntry {
|
591 | /**
|
592 | * Change that was made to extension
|
593 | */
|
594 | auditAction?: string;
|
595 | /**
|
596 | * Date at which the change was made
|
597 | */
|
598 | auditDate?: Date;
|
599 | /**
|
600 | * Extra information about the change
|
601 | */
|
602 | comment?: string;
|
603 | /**
|
604 | * Represents the user who made the change
|
605 | */
|
606 | updatedBy?: VSSInterfaces.IdentityRef;
|
607 | }
|
608 | export interface ExtensionAuthorization {
|
609 | id?: string;
|
610 | scopes?: string[];
|
611 | }
|
612 | /**
|
613 | * Represents a single collection for extension data documents
|
614 | */
|
615 | export interface ExtensionDataCollection {
|
616 | /**
|
617 | * The name of the collection
|
618 | */
|
619 | collectionName?: string;
|
620 | /**
|
621 | * A list of documents belonging to the collection
|
622 | */
|
623 | documents?: any[];
|
624 | /**
|
625 | * The type of the collection's scope, such as Default or User
|
626 | */
|
627 | scopeType?: string;
|
628 | /**
|
629 | * The value of the collection's scope, such as Current or Me
|
630 | */
|
631 | scopeValue?: string;
|
632 | }
|
633 | /**
|
634 | * Represents a query to receive a set of extension data collections
|
635 | */
|
636 | export interface ExtensionDataCollectionQuery {
|
637 | /**
|
638 | * A list of collections to query
|
639 | */
|
640 | collections?: ExtensionDataCollection[];
|
641 | }
|
642 | export interface ExtensionEvent {
|
643 | /**
|
644 | * The extension which has been updated
|
645 | */
|
646 | extension?: GalleryInterfaces.PublishedExtension;
|
647 | /**
|
648 | * The current version of the extension that was updated
|
649 | */
|
650 | extensionVersion?: string;
|
651 | /**
|
652 | * Name of the collection for which the extension was requested
|
653 | */
|
654 | host?: ExtensionHost;
|
655 | /**
|
656 | * Gallery host url
|
657 | */
|
658 | links?: ExtensionEventUrls;
|
659 | /**
|
660 | * Represents the user who initiated the update
|
661 | */
|
662 | modifiedBy?: VSSInterfaces.IdentityRef;
|
663 | /**
|
664 | * The type of update that was made
|
665 | */
|
666 | updateType?: ExtensionUpdateType;
|
667 | }
|
668 | /**
|
669 | * Base class for an event callback for an extension
|
670 | */
|
671 | export interface ExtensionEventCallback {
|
672 | /**
|
673 | * The uri of the endpoint that is hit when an event occurs
|
674 | */
|
675 | uri?: string;
|
676 | }
|
677 | /**
|
678 | * Collection of event callbacks - endpoints called when particular extension events occur.
|
679 | */
|
680 | export interface ExtensionEventCallbackCollection {
|
681 | /**
|
682 | * Optional. Defines an endpoint that gets called via a POST request to notify that an extension disable has occurred.
|
683 | */
|
684 | postDisable?: ExtensionEventCallback;
|
685 | /**
|
686 | * Optional. Defines an endpoint that gets called via a POST request to notify that an extension enable has occurred.
|
687 | */
|
688 | postEnable?: ExtensionEventCallback;
|
689 | /**
|
690 | * Optional. Defines an endpoint that gets called via a POST request to notify that an extension install has completed.
|
691 | */
|
692 | postInstall?: ExtensionEventCallback;
|
693 | /**
|
694 | * Optional. Defines an endpoint that gets called via a POST request to notify that an extension uninstall has occurred.
|
695 | */
|
696 | postUninstall?: ExtensionEventCallback;
|
697 | /**
|
698 | * Optional. Defines an endpoint that gets called via a POST request to notify that an extension update has occurred.
|
699 | */
|
700 | postUpdate?: ExtensionEventCallback;
|
701 | /**
|
702 | * Optional. Defines an endpoint that gets called via a POST request to notify that an extension install is about to occur. Response indicates whether to proceed or abort.
|
703 | */
|
704 | preInstall?: ExtensionEventCallback;
|
705 | /**
|
706 | * For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used
|
707 | */
|
708 | versionCheck?: ExtensionEventCallback;
|
709 | }
|
710 | export interface ExtensionEventUrls extends ExtensionUrls {
|
711 | /**
|
712 | * Url of the extension management page
|
713 | */
|
714 | manageExtensionsPage?: string;
|
715 | }
|
716 | /**
|
717 | * Set of flags applied to extensions that are relevant to contribution consumers
|
718 | */
|
719 | export declare enum ExtensionFlags {
|
720 | /**
|
721 | * A built-in extension is installed for all VSTS accounts by default
|
722 | */
|
723 | BuiltIn = 1,
|
724 | /**
|
725 | * The extension comes from a fully-trusted publisher
|
726 | */
|
727 | Trusted = 2
|
728 | }
|
729 | export interface ExtensionHost {
|
730 | id?: string;
|
731 | name?: string;
|
732 | }
|
733 | /**
|
734 | * How an extension should handle including contributions based on licensing
|
735 | */
|
736 | export interface ExtensionLicensing {
|
737 | /**
|
738 | * A list of contributions which deviate from the default licensing behavior
|
739 | */
|
740 | overrides?: LicensingOverride[];
|
741 | }
|
742 | /**
|
743 | * Base class for extension properties which are shared by the extension manifest and the extension model
|
744 | */
|
745 | export interface ExtensionManifest {
|
746 | /**
|
747 | * Uri used as base for other relative uri's defined in extension
|
748 | */
|
749 | baseUri?: string;
|
750 | /**
|
751 | * List of shared constraints defined by this extension
|
752 | */
|
753 | constraints?: ContributionConstraint[];
|
754 | /**
|
755 | * List of contributions made by this extension
|
756 | */
|
757 | contributions?: Contribution[];
|
758 | /**
|
759 | * List of contribution types defined by this extension
|
760 | */
|
761 | contributionTypes?: ContributionType[];
|
762 | /**
|
763 | * List of explicit demands required by this extension
|
764 | */
|
765 | demands?: string[];
|
766 | /**
|
767 | * Collection of endpoints that get called when particular extension events occur
|
768 | */
|
769 | eventCallbacks?: ExtensionEventCallbackCollection;
|
770 | /**
|
771 | * Secondary location that can be used as base for other relative uri's defined in extension
|
772 | */
|
773 | fallbackBaseUri?: string;
|
774 | /**
|
775 | * Language Culture Name set by the Gallery
|
776 | */
|
777 | language?: string;
|
778 | /**
|
779 | * How this extension behaves with respect to licensing
|
780 | */
|
781 | licensing?: ExtensionLicensing;
|
782 | /**
|
783 | * Version of the extension manifest format/content
|
784 | */
|
785 | manifestVersion?: number;
|
786 | /**
|
787 | * Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution.
|
788 | */
|
789 | restrictedTo?: string[];
|
790 | /**
|
791 | * List of all oauth scopes required by this extension
|
792 | */
|
793 | scopes?: string[];
|
794 | /**
|
795 | * The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
|
796 | */
|
797 | serviceInstanceType?: string;
|
798 | }
|
799 | /**
|
800 | * A request for an extension (to be installed or have a license assigned)
|
801 | */
|
802 | export interface ExtensionRequest {
|
803 | /**
|
804 | * Required message supplied if the request is rejected
|
805 | */
|
806 | rejectMessage?: string;
|
807 | /**
|
808 | * Date at which the request was made
|
809 | */
|
810 | requestDate?: Date;
|
811 | /**
|
812 | * Represents the user who made the request
|
813 | */
|
814 | requestedBy?: VSSInterfaces.IdentityRef;
|
815 | /**
|
816 | * Optional message supplied by the requester justifying the request
|
817 | */
|
818 | requestMessage?: string;
|
819 | /**
|
820 | * Represents the state of the request
|
821 | */
|
822 | requestState?: ExtensionRequestState;
|
823 | /**
|
824 | * Date at which the request was resolved
|
825 | */
|
826 | resolveDate?: Date;
|
827 | /**
|
828 | * Represents the user who resolved the request
|
829 | */
|
830 | resolvedBy?: VSSInterfaces.IdentityRef;
|
831 | }
|
832 | export interface ExtensionRequestEvent {
|
833 | /**
|
834 | * The extension which has been requested
|
835 | */
|
836 | extension?: GalleryInterfaces.PublishedExtension;
|
837 | /**
|
838 | * Information about the host for which this extension is requested
|
839 | */
|
840 | host?: ExtensionHost;
|
841 | /**
|
842 | * Name of the collection for which the extension was requested
|
843 | */
|
844 | hostName?: string;
|
845 | /**
|
846 | * Gallery host url
|
847 | */
|
848 | links?: ExtensionRequestUrls;
|
849 | /**
|
850 | * The extension request object
|
851 | */
|
852 | request?: ExtensionRequest;
|
853 | /**
|
854 | * The type of update that was made
|
855 | */
|
856 | updateType?: ExtensionRequestUpdateType;
|
857 | }
|
858 | export interface ExtensionRequestsEvent {
|
859 | /**
|
860 | * The extension which has been requested
|
861 | */
|
862 | extension?: GalleryInterfaces.PublishedExtension;
|
863 | /**
|
864 | * Information about the host for which this extension is requested
|
865 | */
|
866 | host?: ExtensionHost;
|
867 | /**
|
868 | * Gallery host url
|
869 | */
|
870 | links?: ExtensionRequestUrls;
|
871 | /**
|
872 | * The extension request object
|
873 | */
|
874 | requests?: ExtensionRequest[];
|
875 | /**
|
876 | * The type of update that was made
|
877 | */
|
878 | updateType?: ExtensionRequestUpdateType;
|
879 | }
|
880 | /**
|
881 | * Represents the state of an extension request
|
882 | */
|
883 | export declare enum ExtensionRequestState {
|
884 | /**
|
885 | * The request has been opened, but not yet responded to
|
886 | */
|
887 | Open = 0,
|
888 | /**
|
889 | * The request was accepted (extension installed or license assigned)
|
890 | */
|
891 | Accepted = 1,
|
892 | /**
|
893 | * The request was rejected (extension not installed or license not assigned)
|
894 | */
|
895 | Rejected = 2
|
896 | }
|
897 | export declare enum ExtensionRequestUpdateType {
|
898 | Created = 1,
|
899 | Approved = 2,
|
900 | Rejected = 3,
|
901 | Deleted = 4
|
902 | }
|
903 | export interface ExtensionRequestUrls extends ExtensionUrls {
|
904 | /**
|
905 | * Link to view the extension request
|
906 | */
|
907 | requestPage?: string;
|
908 | }
|
909 | /**
|
910 | * The state of an extension
|
911 | */
|
912 | export interface ExtensionState extends InstalledExtensionState {
|
913 | extensionName?: string;
|
914 | /**
|
915 | * The time at which the version was last checked
|
916 | */
|
917 | lastVersionCheck?: Date;
|
918 | publisherName?: string;
|
919 | version?: string;
|
920 | }
|
921 | /**
|
922 | * 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.
|
923 | */
|
924 | export declare enum ExtensionStateFlags {
|
925 | /**
|
926 | * No flags set
|
927 | */
|
928 | None = 0,
|
929 | /**
|
930 | * Extension is disabled
|
931 | */
|
932 | Disabled = 1,
|
933 | /**
|
934 | * Extension is a built in
|
935 | */
|
936 | BuiltIn = 2,
|
937 | /**
|
938 | * Extension has multiple versions
|
939 | */
|
940 | MultiVersion = 4,
|
941 | /**
|
942 | * Extension is not installed. This is for builtin extensions only and can not otherwise be set.
|
943 | */
|
944 | UnInstalled = 8,
|
945 | /**
|
946 | * Error performing version check
|
947 | */
|
948 | VersionCheckError = 16,
|
949 | /**
|
950 | * 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.
|
951 | */
|
952 | Trusted = 32,
|
953 | /**
|
954 | * Extension is currently in an error state
|
955 | */
|
956 | Error = 64,
|
957 | /**
|
958 | * Extension scopes have changed and the extension requires re-authorization
|
959 | */
|
960 | NeedsReauthorization = 128,
|
961 | /**
|
962 | * Error performing auto-upgrade. For example, if the new version has demands not supported the extension cannot be auto-upgraded.
|
963 | */
|
964 | AutoUpgradeError = 256,
|
965 | /**
|
966 | * 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.
|
967 | */
|
968 | Warning = 512
|
969 | }
|
970 | export declare enum ExtensionUpdateType {
|
971 | Installed = 1,
|
972 | Uninstalled = 2,
|
973 | Enabled = 3,
|
974 | Disabled = 4,
|
975 | VersionUpdated = 5,
|
976 | ActionRequired = 6,
|
977 | ActionResolved = 7
|
978 | }
|
979 | export interface ExtensionUrls {
|
980 | /**
|
981 | * Url of the extension icon
|
982 | */
|
983 | extensionIcon?: string;
|
984 | /**
|
985 | * Link to view the extension details page
|
986 | */
|
987 | extensionPage?: string;
|
988 | }
|
989 | /**
|
990 | * Represents a VSTS extension along with its installation state
|
991 | */
|
992 | export interface InstalledExtension extends ExtensionManifest {
|
993 | /**
|
994 | * The friendly extension id for this extension - unique for a given publisher.
|
995 | */
|
996 | extensionId?: string;
|
997 | /**
|
998 | * The display name of the extension.
|
999 | */
|
1000 | extensionName?: string;
|
1001 | /**
|
1002 | * This is the set of files available from the extension.
|
1003 | */
|
1004 | files?: GalleryInterfaces.ExtensionFile[];
|
1005 | /**
|
1006 | * Extension flags relevant to contribution consumers
|
1007 | */
|
1008 | flags?: ExtensionFlags;
|
1009 | /**
|
1010 | * Information about this particular installation of the extension
|
1011 | */
|
1012 | installState?: InstalledExtensionState;
|
1013 | /**
|
1014 | * This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension.
|
1015 | */
|
1016 | lastPublished?: Date;
|
1017 | /**
|
1018 | * Unique id of the publisher of this extension
|
1019 | */
|
1020 | publisherId?: string;
|
1021 | /**
|
1022 | * The display name of the publisher
|
1023 | */
|
1024 | publisherName?: string;
|
1025 | /**
|
1026 | * Unique id for this extension (the same id is used for all versions of a single extension)
|
1027 | */
|
1028 | registrationId?: string;
|
1029 | /**
|
1030 | * Version of this extension
|
1031 | */
|
1032 | version?: string;
|
1033 | }
|
1034 | export interface InstalledExtensionQuery {
|
1035 | assetTypes?: string[];
|
1036 | monikers?: GalleryInterfaces.ExtensionIdentifier[];
|
1037 | }
|
1038 | /**
|
1039 | * The state of an installed extension
|
1040 | */
|
1041 | export interface InstalledExtensionState {
|
1042 | /**
|
1043 | * States of an installed extension
|
1044 | */
|
1045 | flags?: ExtensionStateFlags;
|
1046 | /**
|
1047 | * List of installation issues
|
1048 | */
|
1049 | installationIssues?: InstalledExtensionStateIssue[];
|
1050 | /**
|
1051 | * The time at which this installation was last updated
|
1052 | */
|
1053 | lastUpdated?: Date;
|
1054 | }
|
1055 | /**
|
1056 | * Represents an installation issue
|
1057 | */
|
1058 | export interface InstalledExtensionStateIssue {
|
1059 | /**
|
1060 | * The error message
|
1061 | */
|
1062 | message?: string;
|
1063 | /**
|
1064 | * Source of the installation issue, for example "Demands"
|
1065 | */
|
1066 | source?: string;
|
1067 | /**
|
1068 | * Installation issue type (Warning, Error)
|
1069 | */
|
1070 | type?: InstalledExtensionStateIssueType;
|
1071 | }
|
1072 | /**
|
1073 | * Installation issue type (Warning, Error)
|
1074 | */
|
1075 | export declare enum InstalledExtensionStateIssueType {
|
1076 | /**
|
1077 | * Represents an installation warning, for example an implicit demand not supported
|
1078 | */
|
1079 | Warning = 0,
|
1080 | /**
|
1081 | * Represents an installation error, for example an explicit demand not supported
|
1082 | */
|
1083 | Error = 1
|
1084 | }
|
1085 | /**
|
1086 | * Maps a contribution to a licensing behavior
|
1087 | */
|
1088 | export interface LicensingOverride {
|
1089 | /**
|
1090 | * How the inclusion of this contribution should change based on licensing
|
1091 | */
|
1092 | behavior?: ContributionLicensingBehaviorType;
|
1093 | /**
|
1094 | * Fully qualified contribution id which we want to define licensing behavior for
|
1095 | */
|
1096 | id?: string;
|
1097 | }
|
1098 | /**
|
1099 | * A request for an extension (to be installed or have a license assigned)
|
1100 | */
|
1101 | export interface RequestedExtension {
|
1102 | /**
|
1103 | * The unique name of the extension
|
1104 | */
|
1105 | extensionName?: string;
|
1106 | /**
|
1107 | * A list of each request for the extension
|
1108 | */
|
1109 | extensionRequests?: ExtensionRequest[];
|
1110 | /**
|
1111 | * DisplayName of the publisher that owns the extension being published.
|
1112 | */
|
1113 | publisherDisplayName?: string;
|
1114 | /**
|
1115 | * Represents the Publisher of the requested extension
|
1116 | */
|
1117 | publisherName?: string;
|
1118 | /**
|
1119 | * The total number of requests for an extension
|
1120 | */
|
1121 | requestCount?: number;
|
1122 | }
|
1123 | /**
|
1124 | * Entry for a specific data provider's resulting data
|
1125 | */
|
1126 | export interface ResolvedDataProvider {
|
1127 | /**
|
1128 | * The total time the data provider took to resolve its data (in milliseconds)
|
1129 | */
|
1130 | duration?: number;
|
1131 | error?: string;
|
1132 | id?: string;
|
1133 | }
|
1134 | export interface Scope {
|
1135 | description?: string;
|
1136 | title?: string;
|
1137 | value?: string;
|
1138 | }
|
1139 | /**
|
1140 | * Information about the extension
|
1141 | */
|
1142 | export interface SupportedExtension {
|
1143 | /**
|
1144 | * Unique Identifier for this extension
|
1145 | */
|
1146 | extension?: string;
|
1147 | /**
|
1148 | * Unique Identifier for this publisher
|
1149 | */
|
1150 | publisher?: string;
|
1151 | /**
|
1152 | * Supported version for this extension
|
1153 | */
|
1154 | version?: string;
|
1155 | }
|
1156 | export declare var TypeInfo: {
|
1157 | AcquisitionAssignmentType: {
|
1158 | enumValues: {
|
1159 | none: number;
|
1160 | me: number;
|
1161 | all: number;
|
1162 | };
|
1163 | };
|
1164 | AcquisitionOperation: any;
|
1165 | AcquisitionOperationState: {
|
1166 | enumValues: {
|
1167 | disallow: number;
|
1168 | allow: number;
|
1169 | completed: number;
|
1170 | };
|
1171 | };
|
1172 | AcquisitionOperationType: {
|
1173 | enumValues: {
|
1174 | get: number;
|
1175 | install: number;
|
1176 | buy: number;
|
1177 | try: number;
|
1178 | request: number;
|
1179 | none: number;
|
1180 | purchaseRequest: number;
|
1181 | };
|
1182 | };
|
1183 | AcquisitionOptions: any;
|
1184 | ContributionLicensingBehaviorType: {
|
1185 | enumValues: {
|
1186 | onlyIfLicensed: number;
|
1187 | onlyIfUnlicensed: number;
|
1188 | alwaysInclude: number;
|
1189 | };
|
1190 | };
|
1191 | ContributionNodeQuery: any;
|
1192 | ContributionPropertyDescription: any;
|
1193 | ContributionPropertyType: {
|
1194 | enumValues: {
|
1195 | unknown: number;
|
1196 | string: number;
|
1197 | uri: number;
|
1198 | guid: number;
|
1199 | boolean: number;
|
1200 | integer: number;
|
1201 | double: number;
|
1202 | dateTime: number;
|
1203 | dictionary: number;
|
1204 | array: number;
|
1205 | object: number;
|
1206 | };
|
1207 | };
|
1208 | ContributionQueryOptions: {
|
1209 | enumValues: {
|
1210 | none: number;
|
1211 | includeSelf: number;
|
1212 | includeChildren: number;
|
1213 | includeSubTree: number;
|
1214 | includeAll: number;
|
1215 | ignoreConstraints: number;
|
1216 | };
|
1217 | };
|
1218 | ContributionType: any;
|
1219 | ExtensionAcquisitionRequest: any;
|
1220 | ExtensionAuditLog: any;
|
1221 | ExtensionAuditLogEntry: any;
|
1222 | ExtensionEvent: any;
|
1223 | ExtensionFlags: {
|
1224 | enumValues: {
|
1225 | builtIn: number;
|
1226 | trusted: number;
|
1227 | };
|
1228 | };
|
1229 | ExtensionLicensing: any;
|
1230 | ExtensionManifest: any;
|
1231 | ExtensionRequest: any;
|
1232 | ExtensionRequestEvent: any;
|
1233 | ExtensionRequestsEvent: any;
|
1234 | ExtensionRequestState: {
|
1235 | enumValues: {
|
1236 | open: number;
|
1237 | accepted: number;
|
1238 | rejected: number;
|
1239 | };
|
1240 | };
|
1241 | ExtensionRequestUpdateType: {
|
1242 | enumValues: {
|
1243 | created: number;
|
1244 | approved: number;
|
1245 | rejected: number;
|
1246 | deleted: number;
|
1247 | };
|
1248 | };
|
1249 | ExtensionState: any;
|
1250 | ExtensionStateFlags: {
|
1251 | enumValues: {
|
1252 | none: number;
|
1253 | disabled: number;
|
1254 | builtIn: number;
|
1255 | multiVersion: number;
|
1256 | unInstalled: number;
|
1257 | versionCheckError: number;
|
1258 | trusted: number;
|
1259 | error: number;
|
1260 | needsReauthorization: number;
|
1261 | autoUpgradeError: number;
|
1262 | warning: number;
|
1263 | };
|
1264 | };
|
1265 | ExtensionUpdateType: {
|
1266 | enumValues: {
|
1267 | installed: number;
|
1268 | uninstalled: number;
|
1269 | enabled: number;
|
1270 | disabled: number;
|
1271 | versionUpdated: number;
|
1272 | actionRequired: number;
|
1273 | actionResolved: number;
|
1274 | };
|
1275 | };
|
1276 | InstalledExtension: any;
|
1277 | InstalledExtensionState: any;
|
1278 | InstalledExtensionStateIssue: any;
|
1279 | InstalledExtensionStateIssueType: {
|
1280 | enumValues: {
|
1281 | warning: number;
|
1282 | error: number;
|
1283 | };
|
1284 | };
|
1285 | LicensingOverride: any;
|
1286 | RequestedExtension: any;
|
1287 | };
|