UNPKG

@craftercms/studio-ui

Version:

Services, components, models & utils to build CrafterCMS authoring extensions.

90 lines (88 loc) 3.52 kB
/* * 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 { DashboardPublishingPackage } from '../models/Dashboard'; import { Observable } from 'rxjs'; import { DetailedItem, PagedArray, PublishingStats, PublishingTargets, SandboxItem } from '../models'; import { Activity } from '../models/Activity'; import PaginationOptions from '../models/PaginationOptions'; import SystemType from '../models/SystemType'; interface FetchActivityOptions extends PaginationOptions { actions?: string[]; usernames?: string[]; dateFrom?: string; dateTo?: string; } export declare function fetchActivity(siteId: string, options?: FetchActivityOptions): Observable<PagedArray<Activity>>; interface FetchMyActivityOptions extends Omit<FetchActivityOptions, 'usernames'> {} export declare function fetchMyActivity( siteId: string, options?: FetchMyActivityOptions ): Observable<PagedArray<Activity>>; export interface FetchPendingApprovalOptions extends PaginationOptions { itemType?: Array<SystemType>; sortBy?: string; sortOrder?: 'asc' | 'desc'; } export declare function fetchPendingApproval( siteId: string, options?: FetchPendingApprovalOptions ): Observable<PagedArray<DetailedItem>>; export interface FetchUnpublishedOptions extends PaginationOptions { itemType?: Array<SystemType>; sortBy?: string; sortOrder?: 'asc' | 'desc'; } export declare function fetchUnpublished( siteId: string, options: FetchUnpublishedOptions ): Observable<PagedArray<SandboxItem>>; export interface FetchScheduledOptions extends PaginationOptions { publishingTarget?: PublishingTargets; approver?: string; dateFrom?: string; dateTo?: string; itemType?: Array<SystemType>; sortBy?: string; sortOrder?: 'asc' | 'desc'; } export declare function fetchScheduled( siteId: string, options: FetchScheduledOptions ): Observable<PagedArray<DetailedItem>>; export declare function fetchScheduledPackageItems(siteId: string, packageId: number): Observable<SandboxItem[]>; export declare function fetchPublishingHistory( siteId: string, options: Partial<FetchScheduledOptions> ): Observable<PagedArray<DashboardPublishingPackage>>; export declare function fetchPublishingHistoryPackageItems( siteId: string, packageId: string, options?: PaginationOptions ): Observable<PagedArray<SandboxItem>>; export interface ExpiredItem { itemName: string; itemPath: string; expiredDateTime: string; sandboxItem: SandboxItem; } export declare function fetchExpired(siteId: string, options?: PaginationOptions): Observable<ExpiredItem[]>; interface FetchExpiringOptions extends PaginationOptions { dateFrom: string; dateTo: string; } export declare function fetchExpiring(siteId: string, options: FetchExpiringOptions): Observable<ExpiredItem[]>; export declare function fetchPublishingStats(siteId: string, days: number): Observable<PublishingStats>; export {};