/** * The Content Repository contains many different types of *Content*. *Content* vary in structure and even in function. * * Different types of content contain different fields, are displayed with different views, and may also implement different business logic. The fields, views and business logic of a content is defined by its type - the Content Type. * * Content Types are defined in a type hierarchy: a Content Type may be inherited from another Content Type - thus automatically inheriting its fields. * * This module represents the above mentioned type hierarchy by Typescript types with the Content Types' Fields as properties. With Typescript classes we can derive types from another * inheriting its properties just like Content Types in the Content Repository. This module provides us to create an objects with a type so that we can validate on its properties by their * types or check the required ones. * */ /** */ import { ActionModel } from './ActionModel'; import * as ComplexTypes from './ComplexTypes'; import * as Enums from './Enums'; export type ContentReferenceField = ComplexTypes.DeferredObject | T | number; export type ContentListReferenceField = ComplexTypes.DeferredObject | T[] | number[]; export type BinaryField = ComplexTypes.MediaResourceObject; export type AllFieldNames = keyof (ContentType & GenericContent & ContentLink & File & DynamicJsonContent & ExecutableFile & HtmlTemplate & Image & PreviewImage & Settings & IndexingSettings & LoggingSettings & PortalSettings & SystemFile & Resource & Folder & ContentList & Aspect & ItemList & CustomList & MemoList & TaskList & Library & DocumentLibrary & ImageLibrary & Device & Domain & Domains & Email & OrganizationalUnit & PortalRoot & ProfileDomain & Profiles & RuntimeContentContainer & Sites & SmartFolder & SystemFolder & Resources & TrashBag & Workspace & Site & TrashBin & UserProfile & Group & ListItem & CustomListItem & Memo & Task & Query & User & Article & ArticleSection & CalendarEvent & EventList & Link & LinkList); /** * A content type is a reusable set of fields you want to apply to certain content. */ export type ContentType = { Id: number; ParentId?: number; VersionId?: number; Name: string; CreatedById?: number; ModifiedById?: number; Version?: string; Path: string; Depth?: number; IsSystemContent?: boolean; HandlerName?: string; ParentTypeName?: string; DisplayName?: string; Description?: string; Icon?: string; Binary?: ComplexTypes.MediaResourceObject; CreatedBy?: ContentReferenceField; CreationDate?: string; ModifiedBy?: ContentReferenceField; ModificationDate?: string; EnableLifespan?: boolean; Actions?: ContentListReferenceField; Type: string; }; /** * This type is the base content type of the sensenet. */ export type GenericContent = { Id: number; ParentId?: number; OwnerId?: number; Owner?: ContentReferenceField; VersionId?: number; Icon?: string; Name: string; CreatedById?: number; ModifiedById?: number; Version?: string; Path: string; Depth?: number; IsSystemContent?: boolean; IsFile?: boolean; IsFolder?: boolean; DisplayName?: string; Description?: string; Hidden?: boolean; Index?: number; EnableLifespan?: boolean; ValidFrom?: string; ValidTill?: string; AllowedChildTypes?: ContentListReferenceField; EffectiveAllowedChildTypes?: ContentListReferenceField; VersioningMode?: Enums.VersioningMode[]; InheritableVersioningMode?: Enums.InheritableVersioningMode[]; CreatedBy?: ContentReferenceField; CreationDate?: string; ModifiedBy?: ContentReferenceField; ModificationDate?: string; ApprovingMode?: Enums.ApprovingMode[]; InheritableApprovingMode?: Enums.InheritableApprovingMode[]; Locked?: boolean; CheckedOutTo?: ContentReferenceField; TrashDisabled?: boolean; SavingState?: Enums.SavingState[]; ExtensionData?: string; BrowseApplication?: ContentReferenceField; Approvable?: boolean; IsTaggable?: boolean; Tags?: string; IsRateable?: boolean; RateStr?: string; RateAvg?: number; RateCount?: number; Rate?: string; Publishable?: boolean; Versions?: ContentListReferenceField; CheckInComments?: string; RejectReason?: string; Workspace?: ContentReferenceField; BrowseUrl?: string; Actions?: ContentListReferenceField; Type: string; VersionModifiedBy?: ContentReferenceField; VersionModificationDate?: Date; VersionCreatedBy?: ContentReferenceField; VersionCreationDate?: Date; }; /** * A content that propagates most of the Fields of another content. */ export type ContentLink = GenericContent & { Link?: ContentReferenceField; }; /** * A type for binary documents, images, etc. */ export type File = GenericContent & { Binary?: ComplexTypes.MediaResourceObject; Size?: number; FullSize?: number; PageCount?: number; MimeType?: string; Shapes?: string; PageAttributes?: string; Watermark?: string; }; /** */ export type DynamicJsonContent = File; /** * Only content of this type can be executed directly (e.g. aspx files). */ export type ExecutableFile = File; /** * HTML file containing a template html fragment for various controls, e.g. action links. */ export type HtmlTemplate = File & { TemplateText?: string; }; /** * A special Document type for storing images. */ export type Image = File & { Keywords?: string; DateTaken?: string; Width?: number; Height?: number; }; /** * A special content type for storing preview images. */ export type PreviewImage = Image; /** * Content type for storing application or module settings in text format or in custom fields. */ export type Settings = File & { GlobalOnly?: boolean; }; /** */ export type IndexingSettings = Settings & { TextExtractorInstances?: string; }; /** */ export type LoggingSettings = Settings; /** */ export type PortalSettings = Settings; /** * A special file for internal use in the system. */ export type SystemFile = File; /** * String or binary resource used to localize the system. Its format is the same as the internal part of a standard .Net resx file. */ export type Resource = SystemFile & { Downloads?: number; }; /** * Use folders to group content. */ export type Folder = GenericContent; /** * Generic Content List type. */ export type ContentList = Folder & { ContentListDefinition?: string; DefaultView?: string; AvailableViews?: ContentListReferenceField; FieldSettingContents?: ContentListReferenceField; AvailableContentTypeFields?: ContentListReferenceField; ListEmail?: string; ExchangeSubscriptionId?: string; OverwriteFiles?: boolean; GroupAttachments?: Enums.GroupAttachments[]; SaveOriginalEmail?: boolean; IncomingEmailWorkflow?: ContentReferenceField; OnlyFromLocalGroups?: boolean; InboxFolder?: string; OwnerWhenVisitor?: ContentReferenceField; }; /** * Aspect base type. */ export type Aspect = ContentList & { AspectDefinition?: string; }; /** * Base type for item lists. Choose a type inheriting from this to create list of items. */ export type ItemList = ContentList; /** * Use this type to create custom Lists of content with user-defined columns. */ export type CustomList = ItemList; /** * A List type for storing Memos. */ export type MemoList = ItemList; /** * A List type for storing Tasks. */ export type TaskList = ItemList; /** * A base type for special List types for storing documents such as Document Library or Image Library. */ export type Library = ContentList; /** * A special List for storing documents. */ export type DocumentLibrary = Library; /** * A special List for storing images. */ export type ImageLibrary = Library & { CoverImage?: ContentReferenceField; }; /** * This content type is for defining different devices to browse the portal from - e.g. tablet or different phone types. */ export type Device = Folder & { UserAgentPattern?: string; }; /** * A centrally-managed group of users and/or computers. sensenet has a built-in domain (BuiltIn), but you can syncronyze external LDAP directories as well. */ export type Domain = Folder & { SyncGuid?: string; LastSync?: string; }; /** * This is the container type for Domains. Only a single instance is allowed at /Root/IMS. */ export type Domains = Folder; /** * Email content type containing attachments as children content. */ export type Email = Folder & { From?: string; Body?: string; Sent?: string; }; /** * Organizational Unit (OU) provides a way of classifying objects located in directories. */ export type OrganizationalUnit = Folder & { SyncGuid?: string; LastSync?: string; }; /** * Sense/Net Content Repository Master node. One installation can have only one Portal Root. */ export type PortalRoot = Folder; /** * Container for user profiles. */ export type ProfileDomain = Folder; /** * This is the container type for profiles. Only a single instance is allowed at /Root/Profiles. */ export type Profiles = Folder; /** * For internal use only. */ export type RuntimeContentContainer = Folder; /** * This is the container type for sites. Only a single instance is allowed at /Root/Sites. */ export type Sites = Folder; /** * Use smart folders to group information (content) by Repository query. */ export type SmartFolder = Folder & { Query?: string; EnableAutofilters?: Enums.EnableAutofilters[]; EnableLifespanFilter?: Enums.EnableLifespanFilter[]; }; /** * System Folders provide a way to store configuration and logic. */ export type SystemFolder = Folder; /** * This is the container type for resources. Only a single instance is allowed at /Root/Localization. */ export type Resources = SystemFolder; /** * An atomic container for deleted items stored for undeletion. */ export type TrashBag = Folder & { KeepUntil?: string; OriginalPath?: string; WorkspaceRelativePath?: string; WorkspaceId?: number; DeletedContent?: ContentReferenceField; }; /** * Collaborative workspace root. */ export type Workspace = Folder & { Manager?: ContentReferenceField; Deadline?: string; IsActive?: boolean; WorkspaceSkin?: ContentReferenceField; IsCritical?: boolean; IsWallContainer?: boolean; IsFollowed?: boolean; }; /** * The Site provides a primary entry point to your Portal. */ export type Site = Workspace & { Language?: Enums.Language[]; EnableClientBasedCulture?: boolean; EnableUserBasedCulture?: boolean; UrlList?: string; StartPage?: ContentReferenceField; LoginPage?: ContentReferenceField; SiteSkin?: ContentReferenceField; DenyCrossSiteAccess?: boolean; }; /** * The system trash bin content type. */ export type TrashBin = Workspace & { MinRetentionTime?: number; SizeQuota?: number; BagCapacity?: number; }; /** * Workspace for handling all information and data for a user. */ export type UserProfile = Workspace & { User?: ContentReferenceField; }; /** * You can categorize users and groups into groups according to any criteria. */ export type Group = GenericContent & { Members?: ContentListReferenceField; SyncGuid?: string; LastSync?: string; }; /** * Base content type for list items. */ export type ListItem = GenericContent; /** * Content type for custom listitems. */ export type CustomListItem = ListItem & { WorkflowsRunning?: boolean; }; /** * A content type for short memos or posts on a subject. */ export type Memo = ListItem & { Date?: string; MemoType?: Enums.MemoType[]; SeeAlso?: ContentListReferenceField; }; /** * A content type for defining tasks. */ export type Task = ListItem & { StartDate?: string; DueDate?: string; AssignedTo?: ContentListReferenceField; Priority?: Enums.Priority[]; Status?: Enums.Status[]; TaskCompletion?: number; RemainingDays?: number; DueText?: string; DueCssClass?: string; }; /** * Content Type for storing Content Queries */ export type Query = GenericContent & { Query?: string; QueryType?: Enums.QueryType[]; UiFilters?: string; }; /** * The basic user type of the sensenet. Use it for intranet and extranet users. */ export type User = GenericContent & { LoginName?: string; JobTitle?: string; Enabled?: boolean; Domain?: string; Email?: string; FullName?: string; ImageRef?: ContentReferenceField; ImageData?: ComplexTypes.MediaResourceObject; Avatar?: { Url: string; }; Password?: string; SyncGuid?: string; LastSync?: string; Captcha?: string; Manager?: ContentReferenceField; Department?: string; Languages?: string; Phone?: string; Gender?: Enums.Gender[]; MaritalStatus?: Enums.MaritalStatus[]; BirthDate?: string; Education?: string; TwitterAccount?: string; FacebookURL?: string; LinkedInURL?: string; Language?: Enums.Language[]; FollowedWorkspaces?: ContentListReferenceField; ProfilePath?: string; LastLoggedOut?: string; }; /** * The basic text based content type of the sensenet. */ export type Article = GenericContent & { Subtitle?: string; Author?: string; Lead?: string; Body?: string; Pinned?: boolean; Keywords?: string; ImageRef?: ContentReferenceField; ImageData?: ComplexTypes.MediaResourceObject; Image?: { Url: string; }; }; /** * Content type for group articles. */ export type ArticleSection = Folder; export type CalendarEvent = ListItem & { Location?: string; StartDate?: string; EndDate?: string; AllDay?: boolean; EventType?: Enums.EventType[]; }; /** * Content list type for grouping calendar events */ export type EventList = ContentList; export type Link = ListItem & { Url?: string; }; /** * Content list type for grouping external links */ export type LinkList = ContentList; //# sourceMappingURL=DefaultContentTypes.d.ts.map