All files / src ContentTypes.ts

100% Statements 50/50
100% Branches 0/0
100% Functions 0/0
100% Lines 50/50
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657                                                      1x                                                         1x                                                                                                                         1x                   1x                                 1x                 1x                 1x                   1x                         1x                 1x                   1x                   1x                 1x                 1x                 1x                   1x                 1x                                             1x                   1x                 1x                 1x                 1x                 1x                 1x                 1x                   1x                   1x                     1x                 1x                       1x                     1x                 1x                 1x                 1x                 1x                 1x                       1x                 1x                 1x                           1x                               1x                                 1x                       1x                   1x                       1x                 1x                   1x                       1x                                   1x                     1x                                                            
/**
 *
 * @module ContentTypes
 * @preferred
 *
 *
 * @description 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 classes 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.
 *
 *//** */
 
// tslint:disable:naming-convention
 
  import { BinaryField } from './BinaryField';
  import { ContentListReferenceField, ContentReferenceField } from './ContentReferences';
  import { ComplexTypes, Enums } from './SN';
 
 /**
  * Class representing a ContentType
  * @class ContentType
  */
  export class ContentType {
     public Id?: number;
     public ParentId?: number;
     public VersionId?: number;
     public Name?: string;
     public CreatedById?: number;
     public ModifiedById?: number;
     public Version?: string;
     public Path?: string;
     public Depth?: number;
     public IsSystemContent?: boolean;
     public HandlerName?: string;
     public ParentTypeName?: string;
     public DisplayName?: string;
     public Description?: string;
     public Icon?: string;
     public Binary?: ComplexTypes.MediaResourceObject;
     public CreatedBy?: ContentReferenceField<GenericContent>;
     public CreationDate?: string;
     public ModifiedBy?: ContentReferenceField<GenericContent>;
     public ModificationDate?: string;
     public EnableLifespan?: boolean;
 
 }
 
 /**
  * Class representing a GenericContent
  * @class GenericContent
  */
  export class GenericContent {
     public Id?: number;
     public ParentId?: number;
     public OwnerId?: number;
     public Owner?: ContentReferenceField<GenericContent>;
     public VersionId?: number;
     public Icon?: string;
     public Name?: string;
     public CreatedById?: number;
     public ModifiedById?: number;
     public Version?: string;
     public Path?: string;
     public Depth?: number;
     public IsSystemContent?: boolean;
     public IsFolder?: boolean;
     public DisplayName?: string;
     public Description?: string;
     public Hidden?: boolean;
     public Index?: number;
     public EnableLifespan?: boolean;
     public ValidFrom?: string;
     public ValidTill?: string;
     public AllowedChildTypes?: string;
     public EffectiveAllowedChildTypes?: string;
     public VersioningMode?: Enums.VersioningMode;
     public InheritableVersioningMode?: Enums.InheritableVersioningMode;
     public CreatedBy?: ContentReferenceField<GenericContent>;
     public CreationDate?: string;
     public ModifiedBy?: ContentReferenceField<GenericContent>;
     public ModificationDate?: string;
     public ApprovingMode?: Enums.ApprovingMode;
     public InheritableApprovingMode?: Enums.InheritableApprovingMode;
     public Locked?: boolean;
     public CheckedOutTo?: ContentReferenceField<GenericContent>;
     public TrashDisabled?: boolean;
     public SavingState?: Enums.SavingState;
     public ExtensionData?: string;
     public BrowseApplication?: ContentReferenceField<GenericContent>;
     public Approvable?: boolean;
     public IsTaggable?: boolean;
     public Tags?: string;
     public IsRateable?: boolean;
     public RateStr?: string;
     public RateAvg?: number;
     public RateCount?: number;
     public Rate?: string;
     public Publishable?: boolean;
     public Versions?: ContentListReferenceField<GenericContent>;
     public CheckInComments?: string;
     public RejectReason?: string;
     public Workspace?: ContentReferenceField<Workspace>;
     public BrowseUrl?: string;
     public Type?: string;
 
 }
 
 /**
  * Class representing a ContentLink
  * @class ContentLink
  * @extends {@link GenericContent}
  */
  export class ContentLink extends GenericContent {
     public Link?: ContentReferenceField<GenericContent>;
 
 }
 
 /**
  * Class representing a File
  * @class File
  * @extends {@link GenericContent}
  */
  export class File extends GenericContent {
     public Binary: BinaryField<this>;
     public Size?: number;
     public FullSize?: number;
     public PageCount?: number;
     public MimeType?: string;
     public Shapes?: string;
     public PageAttributes?: string;
     public Watermark?: string;
 
 }
 
 /**
  * Class representing a DynamicJsonContent
  * @class DynamicJsonContent
  * @extends {@link File}
  */
  export class DynamicJsonContent extends File {
 
 }
 
 /**
  * Class representing a ExecutableFile
  * @class ExecutableFile
  * @extends {@link File}
  */
  export class ExecutableFile extends File {
 
 }
 
 /**
  * Class representing a HtmlTemplate
  * @class HtmlTemplate
  * @extends {@link File}
  */
  export class HtmlTemplate extends File {
     public TemplateText?: string;
 
 }
 
 /**
  * Class representing a Image
  * @class Image
  * @extends {@link File}
  */
  export class Image extends File {
     public Keywords?: string;
     public DateTaken?: string;
     public Width?: number;
     public Height?: number;
 
 }
 
 /**
  * Class representing a PreviewImage
  * @class PreviewImage
  * @extends {@link Image}
  */
  export class PreviewImage extends Image {
 
 }
 
 /**
  * Class representing a Settings
  * @class Settings
  * @extends {@link File}
  */
  export class Settings extends File {
     public GlobalOnly?: boolean;
 
 }
 
 /**
  * Class representing a IndexingSettings
  * @class IndexingSettings
  * @extends {@link Settings}
  */
  export class IndexingSettings extends Settings {
     public TextExtractorInstances?: string;
 
 }
 
 /**
  * Class representing a LoggingSettings
  * @class LoggingSettings
  * @extends {@link Settings}
  */
  export class LoggingSettings extends Settings {
 
 }
 
 /**
  * Class representing a PortalSettings
  * @class PortalSettings
  * @extends {@link Settings}
  */
  export class PortalSettings extends Settings {
 
 }
 
 /**
  * Class representing a SystemFile
  * @class SystemFile
  * @extends {@link File}
  */
  export class SystemFile extends File {
 
 }
 
 /**
  * Class representing a Resource
  * @class Resource
  * @extends {@link SystemFile}
  */
  export class Resource extends SystemFile {
     public Downloads?: number;
 
 }
 
 /**
  * Class representing a Folder
  * @class Folder
  * @extends {@link GenericContent}
  */
  export class Folder extends GenericContent {
 
 }
 
 /**
  * Class representing a ContentList
  * @class ContentList
  * @extends {@link Folder}
  */
  export class ContentList extends Folder {
     public ContentListDefinition?: string;
     public DefaultView?: string;
    //  AvailableViews?: ContentListReferenceField<ListView>;
    //  FieldSettingContents?: ContentListReferenceField<FieldSettingContent>;
    //  AvailableContentTypeFields?: ContentListReferenceField<FieldSettingContent>;
     public ListEmail?: string;
     public ExchangeSubscriptionId?: string;
     public OverwriteFiles?: boolean;
     public GroupAttachments?: Enums.GroupAttachments;
     public SaveOriginalEmail?: boolean;
     public IncomingEmailWorkflow?: ContentReferenceField<GenericContent>;
     public OnlyFromLocalGroups?: boolean;
     public InboxFolder?: string;
     public OwnerWhenVisitor?: ContentReferenceField<User>;
 
 }
 
 /**
  * Class representing a Aspect
  * @class Aspect
  * @extends {@link ContentList}
  */
  export class Aspect extends ContentList {
     public AspectDefinition?: string;
 
 }
 
 /**
  * Class representing a ItemList
  * @class ItemList
  * @extends {@link ContentList}
  */
  export class ItemList extends ContentList {
 
 }
 
 /**
  * Class representing a CustomList
  * @class CustomList
  * @extends {@link ItemList}
  */
  export class CustomList extends ItemList {
 
 }
 
 /**
  * Class representing a MemoList
  * @class MemoList
  * @extends {@link ItemList}
  */
  export class MemoList extends ItemList {
 
 }
 
 /**
  * Class representing a TaskList
  * @class TaskList
  * @extends {@link ItemList}
  */
  export class TaskList extends ItemList {
 
 }
 
 /**
  * Class representing a Library
  * @class Library
  * @extends {@link ContentList}
  */
  export class Library extends ContentList {
 
 }
 
 /**
  * Class representing a DocumentLibrary
  * @class DocumentLibrary
  * @extends {@link Library}
  */
  export class DocumentLibrary extends Library {
 
 }
 
 /**
  * Class representing a ImageLibrary
  * @class ImageLibrary
  * @extends {@link Library}
  */
  export class ImageLibrary extends Library {
     public CoverImage?: ContentReferenceField<Image>;
 
 }
 
 /**
  * Class representing a Device
  * @class Device
  * @extends {@link Folder}
  */
  export class Device extends Folder {
     public UserAgentPattern?: string;
 
 }
 
 /**
  * Class representing a Domain
  * @class Domain
  * @extends {@link Folder}
  */
  export class Domain extends Folder {
     public SyncGuid?: string;
     public LastSync?: string;
 
 }
 
 /**
  * Class representing a Domains
  * @class Domains
  * @extends {@link Folder}
  */
  export class Domains extends Folder {
 
 }
 
 /**
  * Class representing a Email
  * @class Email
  * @extends {@link Folder}
  */
  export class Email extends Folder {
     public From?: string;
     public Body?: string;
     public Sent?: string;
 
 }
 
 /**
  * Class representing a OrganizationalUnit
  * @class OrganizationalUnit
  * @extends {@link Folder}
  */
  export class OrganizationalUnit extends Folder {
     public SyncGuid?: string;
     public LastSync?: string;
 
 }
 
 /**
  * Class representing a PortalRoot
  * @class PortalRoot
  * @extends {@link Folder}
  */
  export class PortalRoot extends Folder {
 
 }
 
 /**
  * Class representing a ProfileDomain
  * @class ProfileDomain
  * @extends {@link Folder}
  */
  export class ProfileDomain extends Folder {
 
 }
 
 /**
  * Class representing a Profiles
  * @class Profiles
  * @extends {@link Folder}
  */
  export class Profiles extends Folder {
 
 }
 
 /**
  * Class representing a RuntimeContentContainer
  * @class RuntimeContentContainer
  * @extends {@link Folder}
  */
  export class RuntimeContentContainer extends Folder {
 
 }
 
 /**
  * Class representing a Sites
  * @class Sites
  * @extends {@link Folder}
  */
  export class Sites extends Folder {
 
 }
 
 /**
  * Class representing a SmartFolder
  * @class SmartFolder
  * @extends {@link Folder}
  */
  export class SmartFolder extends Folder {
     public Query?: string;
     public EnableAutofilters?: Enums.EnableAutofilters;
     public EnableLifespanFilter?: Enums.EnableLifespanFilter;
 
 }
 
 /**
  * Class representing a SystemFolder
  * @class SystemFolder
  * @extends {@link Folder}
  */
  export class SystemFolder extends Folder {
 
 }
 
 /**
  * Class representing a Resources
  * @class Resources
  * @extends {@link SystemFolder}
  */
  export class Resources extends SystemFolder {
 
 }
 
 /**
  * Class representing a TrashBag
  * @class TrashBag
  * @extends {@link Folder}
  */
  export class TrashBag extends Folder {
     public KeepUntil?: string;
     public OriginalPath?: string;
     public WorkspaceRelativePath?: string;
     public WorkspaceId?: number;
     public DeletedContent?: ContentReferenceField<GenericContent>;
 
 }
 
 /**
  * Class representing a Workspace
  * @class Workspace
  * @extends {@link Folder}
  */
  export class Workspace extends Folder {
     public Manager?: ContentReferenceField<User>;
     public Deadline?: string;
     public IsActive?: boolean;
     // WorkspaceSkin?: ContentReferenceField<Skin>;
     public IsCritical?: boolean;
     public IsWallContainer?: boolean;
     public IsFollowed?: boolean;
 
 }
 
 /**
  * Class representing a Site
  * @class Site
  * @extends {@link Workspace}
  */
  export class Site extends Workspace {
     public Language?: Enums.Language;
     public EnableClientBasedCulture?: boolean;
     public EnableUserBasedCulture?: boolean;
     public UrlList?: string;
     public StartPage?: ContentReferenceField<GenericContent>;
     public LoginPage?: ContentReferenceField<GenericContent>;
     // SiteSkin?: ContentReferenceField<Skin>;
     public DenyCrossSiteAccess?: boolean;
 
 }
 
 /**
  * Class representing a TrashBin
  * @class TrashBin
  * @extends {@link Workspace}
  */
  export class TrashBin extends Workspace {
     public MinRetentionTime?: number;
     public SizeQuota?: number;
     public BagCapacity?: number;
 
 }
 
 /**
  * Class representing a UserProfile
  * @class UserProfile
  * @extends {@link Workspace}
  */
  export class UserProfile extends Workspace {
     public User?: ContentReferenceField<User>;
 
 }
 
 /**
  * Class representing a Group
  * @class Group
  * @extends {@link GenericContent}
  */
  export class Group extends GenericContent {
     public Members?: ContentListReferenceField<User | Group>;
     public SyncGuid?: string;
     public LastSync?: string;
 
 }
 
 /**
  * Class representing a ListItem
  * @class ListItem
  * @extends {@link GenericContent}
  */
  export class ListItem extends GenericContent {
 
 }
 
 /**
  * Class representing a CustomListItem
  * @class CustomListItem
  * @extends {@link ListItem}
  */
  export class CustomListItem extends ListItem {
     public WorkflowsRunning?: boolean;
 
 }
 
 /**
  * Class representing a Memo
  * @class Memo
  * @extends {@link ListItem}
  */
  export class Memo extends ListItem {
     public Date?: string;
     public MemoType?: Enums.MemoType;
     public SeeAlso?: ContentListReferenceField<GenericContent>;
 
 }
 
 /**
  * Class representing a Task
  * @class Task
  * @extends {@link ListItem}
  */
  export class Task extends ListItem {
     public StartDate?: string;
     public DueDate?: string;
     public AssignedTo?: ContentListReferenceField<User>;
     public Priority?: Enums.Priority;
     public Status?: Enums.Status;
     public TaskCompletion?: number;
     public RemainingDays?: number;
     public DueText?: string;
     public DueCssClass?: string;
 
 }
 
 /**
  * Class representing a Query
  * @class Query
  * @extends {@link GenericContent}
  */
  export class Query extends GenericContent {
     public Query?: string;
     public QueryType?: Enums.QueryType;
 
 }
 
 /**
  * Class representing a User
  * @class User
  * @extends {@link GenericContent}
  */
  export class User extends GenericContent {
     public LoginName?: string;
     public JobTitle?: string;
     public Enabled?: boolean;
     public Domain?: string;
     public Email?: string;
     public FullName?: string;
     public ImageRef?: ContentReferenceField<GenericContent>;
     public ImageData?: ComplexTypes.MediaResourceObject;
     public Avatar?: ComplexTypes.DeferredObject;
     public Password?: string;
     public SyncGuid?: string;
     public LastSync?: string;
     public Captcha?: string;
     public Manager?: ContentReferenceField<User>;
     public Department?: string;
     public Languages?: string;
     public Phone?: string;
     public Gender?: Enums.Gender;
     public MaritalStatus?: Enums.MaritalStatus;
     public BirthDate?: string;
     public Education?: string;
     public TwitterAccount?: string;
     public FacebookURL?: string;
     public LinkedInURL?: string;
     public Language?: Enums.Language;
     public FollowedWorkspaces?: ContentListReferenceField<Workspace>;
     public ProfilePath?: string;
 
 }