import * as WebApi from "../WebApi/WebApi"; export interface ArtifactProperties { } /** * Describes the scope a favorited Artifact resides in. e.g. A team project. */ export interface ArtifactScope { /** * The identifier of the scope the artifact resides in. For a TFS Project, this refers to the Project GUID string. For a Collection, marked this property with an empty string. */ id: string; /** * Name of the artifact scope (e.g. Project Name) Note: This property is a read-only extension over the stored favorite model. This value cannot be overridden on writes. */ name: string; /** * Type of scope the favorite artifact resides in. Known scopes include "Project" or "Collection" */ type: string; } /** * Implementation of Favorite contract following modern storage */ export interface Favorite { /** * Links to the resources associated to the underlying artifact. */ _links: any; /** * ID of the favorited artifact, unique in context of this artifact type. */ artifactId: string; /** * Indicates if the artifact described by this favorite could not be located. */ artifactIsDeleted: boolean; /** * Last known name of the artifact. */ artifactName: string; /** * A dictionary of cached properties describing a Favorited artifact. Structure is generated by the service-side feature metadata provider handling this Artifact Type. */ artifactProperties: ArtifactProperties; /** * Artifact Scope - This object describes where an artifact is contained. e.g. Project Mandatory param for creating all favorites. */ artifactScope: ArtifactScope; /** * Type of artifact. */ artifactType: string; /** * Date and time this Favorite was created on server. */ creationDate: Date; /** * Unique Id of the favorite item, defined by server at creation time. */ id: string; /** * User identity, defined by server, based on active user context. */ owner: WebApi.IdentityRef; /** * Fully-Qualified link to this Resource */ url: string; } export interface FavoriteCreateParameters { artifactId: string; artifactName: string; artifactProperties: ArtifactProperties; artifactScope: ArtifactScope; artifactType: string; } /** * Exposes a provider of favorites. */ export interface FavoriteProvider extends FavoritesSecuredObject { /** * Favorite artifact type */ artifactType: string; /** * URI for retrieving favorite artifacts */ artifactUri: string; /** * contributed client side service that is available for this provider to provide dynamic associated data. */ clientServiceIdentifier: string; /** * Contribution Id */ contributionId: string; /** * Css class to be applied to the icon for the artifact. */ iconClass: string; /** * Name of the fabric icon to be applied for the artifact */ iconName: string; /** * Group of favorites will be rendered in this order, 0 is top If 2 types share order, they will be coalesced into a single group */ order: number; /** * Name used for rendering the title of each group of favorites */ pluralName: string; /** * Service identifier of the service. */ serviceIdentifier: string; /** * Base URI of the service */ serviceUri: string; } export interface FavoritesSecuredObject { token: string; }