@craftercms/studio-ui
Version:
Services, components, models & utils to build CrafterCMS authoring extensions.
49 lines (47 loc) • 1.91 kB
TypeScript
/*
* 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 { SandboxItem } from '../models/Item';
import { PagedArray } from '../models/PagedArray';
import PaginationOptions from '../models/PaginationOptions';
import { PublishingParams } from '../models/Publishing';
export declare function fetchItemStates(
siteId: string,
path?: string,
states?: number,
options?: PaginationOptions
): Observable<PagedArray<SandboxItem>>;
export interface StatesToUpdate {
clearSystemProcessing?: boolean;
clearUserLocked?: boolean;
live?: boolean;
staged?: boolean;
}
export declare function setItemStates(
siteId: string,
items: string[],
{ ...rest }: StatesToUpdate
): Observable<boolean>;
export declare function setItemStatesByQuery(
siteId: string,
states: number,
update: StatesToUpdate,
path?: string
): Observable<boolean>;
export declare function publish(siteId: string, data: PublishingParams): Observable<boolean>;
export declare function requestPublish(siteId: string, data: PublishingParams): Observable<boolean>;
export declare function approve(siteId: string, data: PublishingParams): Observable<boolean>;
export declare function reject(siteId: string, items: string[], comment: string): Observable<boolean>;