import type Accessor from "../core/Accessor.js";

export interface PortalRatingProperties extends Partial<Pick<PortalRating, "rating">> {
  /** Date the rating was added to the item. */
  created?: (Date | number | string) | null;
}

/**
 * PortalRating provides details about the rating associated with a [Portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html).
 * View the ArcGIS REST API documentation for the
 * [Item Rating](https://developers.arcgis.com/rest/users-groups-and-items/item-rating.htm) for more details.
 *
 * @since 4.2
 */
export default class PortalRating extends Accessor {
  constructor(properties?: PortalRatingProperties);
  /** Date the rating was added to the item. */
  get created(): Date | null | undefined;
  set created(value: (Date | number | string) | null | undefined);
  /** A rating between 1.0 and 5.0 for the item. */
  accessor rating: number | null | undefined;
}