import type { JSONSupport } from "../../../../core/JSONSupport.js";

export interface ReconcileResultProperties extends Partial<Pick<ReconcileResult, "didPost" | "hasConflicts" | "success">> {
  /**
   * Returns data moment of the reconcile.
   *
   * @since 5.0
   */
  moment?: (Date | number | string) | null;
}

/**
 * This contains information about the reconcile result.
 *
 * @since 4.28
 */
export default class ReconcileResult extends JSONSupport {
  constructor(properties?: ReconcileResultProperties);
  /**
   * Specifies if the updates from the version were posted.
   *
   * @default false
   * @since 5.0
   */
  accessor didPost: boolean;
  /**
   * Specifies if the reconcile returned with conflicts.
   *
   * @default false
   * @since 5.0
   */
  accessor hasConflicts: boolean;
  /**
   * Returns data moment of the reconcile.
   *
   * @since 5.0
   */
  get moment(): Date | null | undefined;
  set moment(value: (Date | number | string) | null | undefined);
  /**
   * Specifies if the reconcile rest call was successful.
   *
   * @default false
   * @since 5.0
   */
  accessor success: boolean;
}