/*
 * Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3 as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import { Observable } from 'rxjs';
import { LegacyItem } from '../models/Item';
import { PublishingStatus, PublishingTarget, PublishingTargets } from '../models/Publishing';
import { Api2ResponseFormat } from '../models/ApiResponse';
import { PagedArray } from '../models/PagedArray';
interface FetchPackagesResponse extends Omit<PublishingPackage, 'items'> {}
export declare function fetchPackages(
  siteId: string,
  filters: Partial<{
    environment: string;
    path: string;
    states: string;
    offset: number;
    limit: number;
  }>
): Observable<PagedArray<FetchPackagesResponse>>;
export interface PublishingPackage {
  approver: string;
  comment: string;
  environment: PublishingTargets;
  id: string;
  items: Array<{
    contentTypeClass: string;
    mimeType: string;
    path: string;
  }>;
  schedule: string;
  siteId: string;
  state: string;
}
export declare function fetchPackage(siteId: string, packageId: string): Observable<PublishingPackage>;
export declare function cancelPackage(
  siteId: string,
  packageIds: any
): Observable<import('rxjs/ajax').AjaxResponse<any>>;
export type FetchPublishingTargetsResponse = Api2ResponseFormat<{
  published: boolean;
  publishingTargets: Array<PublishingTarget>;
}>;
export declare function fetchPublishingTargets(site: string): Observable<FetchPublishingTargetsResponse>;
export interface GoLiveResponse {
  status: number;
  commitId: string;
  item: LegacyItem;
  invalidateCache: boolean;
  success: boolean;
  message: string;
}
export declare function fetchStatus(siteId: string): Observable<PublishingStatus>;
export declare function start(siteId: string): Observable<true>;
export declare function stop(siteId: string): Observable<true>;
export declare function bulkGoLive(
  siteId: string,
  path: string,
  environment: string,
  comment: string
): Observable<true>;
export declare function publishByCommits(
  siteId: string,
  commitIds: string[],
  environment: string,
  comment: string
): Observable<true>;
export declare function publishAll(
  siteId: string,
  publishingTarget: string,
  submissionComment: string
): Observable<true>;
export declare function clearLock(siteId: string): Observable<boolean>;
export {};
