import { CrudStoreItemsModel } from "../stores/types/CrudStoreModel"; export interface Redirect { id: string; from: string; to: Link; created: Date; modified: Date; startDate: Date; endDate: Date | null; hasDynamicValueTags: boolean; isPermanent: boolean; toComposedUrl: string; description?: string; } export interface RedirectInfo { pageId?: string; pageTitle?: string; url: string; displayUrl: string; } interface Link { text?: string; noFollow: boolean; targetIsBlank: boolean; url?: string; page?: string; } export interface ApiResponse { $type: string; } export interface BaseEntity { id: string; created: string; createdBy: string | null; modified: string; modifiedBy: string | null; } export interface Page extends ApiResponse { id: string; title: string; path: string; name: string; itemName: string; itemDisplayName: string; parentId: string | null; isChild: boolean; allowNew: boolean; isSingleton: boolean; children: Page[]; url: string; createdBy: string | null; modifiedBy: string | null; language: string | null; languageRef: string | null; translations: string[] | null; } export interface VersionedPage extends Page { versions: Version[]; } export interface PublishedPage { pageId: string; publishedVersionId: string; } export type Folder = PublishedPage export interface PageBreadCrumbs { parents: Page[]; current: Page; } export interface Schema { properties: any; oneOf: SchemaItem[]; } export interface SchemaItem { type: string; title: string; properties: any; isSingleton?: boolean; preventDelete?: boolean; preventDepublish?: boolean; preventMove?: boolean; preventRename?: boolean; } export interface BaseCreatePagePayload { [key: string]: string; name: string; parentId: string; } export interface CreatePagePayload extends BaseCreatePagePayload { version: string; } export interface CreatePageFromCopyPayload extends BaseCreatePagePayload { sourceVersionId: string; } export interface PagePayload { page: Page; } export interface MovePagePayload extends PagePayload { newParentId: string; } export interface RenamePagePayload extends PagePayload { name: string; } export interface Version extends ApiResponse { id: string; name: string | null; metaTitle: string; metaDescription: string | null; canonical: string | null; isPublishedOrSchedule: boolean; metaFollow: boolean; metaIndex: boolean; showAsOneSection: boolean; showPostFix: boolean; created: string; modified: string; publishDate: string | null; depublishDate: string | null; page: Page; pageId: string; } export interface ScheduleTimeObject { hours: number; minutes: number; } export interface RecurringSchedule { id: string; cmsPageVersionId: string; recurrenceStartTime: ScheduleTimeObject; recurrenceEndTime: ScheduleTimeObject; selectedDay: string; } export interface Asset extends BaseEntity, ApiResponse { alt: string | null; // Backwards compatibility for non-multi-language usage alts: { [languageKey: string]: string } | null; // Dictionary for alt texts by language blobstoreUrl: string; centerPoint?: CenterPoint; contentType: string; createdOn: string; height: number; imageUrl: string; isDeleted: boolean; previewData: string; size: number; sourceId: string; title: string; variants: AssetVariant[]; width: number; tagIds: string[]; } export interface AssetTag { id: string; title: string; } export interface AddAssetTagsRequest { assetIds: string[]; tagIds: string[]; } export interface AssetVariant { $type?: string; crop: AssetVariantCrop; fixedAspectRatio?: number; id: string; isDefaultVariant?: boolean; isUntouched?: boolean; name?: string; } export interface AssetVariantCrop { $type?: string; centerPoint: CenterPoint; width: number; height: number; } export interface CenterPoint { $type?: string; x: number; y: number; } export interface AssetSearchRequest { search: string; tagFilter: string[]; currentPage?: number; pageSize?: number; onlyDeleted?: boolean; assetTypeFilter?: AssetTypeFilter; assetSortField?: AssetSortField; assetSortOrder?: AssetSortOrder; } export interface AssetPagination { totalResults: number; currentPage: number; totalPages: number; pageSize: number; } export interface AssetSearchResponse extends Omit { results: Asset[]; } export enum AssetTypeFilter { All, Image, Video, PDF, Other } export enum AssetSortField { DateCreated, DateModified, Title } export enum AssetSortOrder { Ascending, Descending } export interface DynamicValueTags { globalTags: DynamicValueTag[]; personalTags: DynamicValueTag[]; } export interface DynamicValueTag { default: string; description: string; text: string; } export interface SaveCrudItemPayload { id: string; item: CrudStoreItemsModel; } export interface CreateCrudItemPayload { item: CrudStoreItemsModel; } export interface UpdateCrudItemPayload { id: string; item: CrudStoreItemsModel; } export interface CopyCrudItemPayload { id: string; } export interface DeleteCrudItemPayload { id: string; } export interface Documentation { text: string; } export interface User extends BaseEntity, ApiResponse { email: string; name: string; isSuperUser: boolean; avatar: Asset | null; }