import { AuthorResponse } from './Author'; import { PublishingChannelId } from './Channel'; import { PagedListResponse } from './common'; import { ContentId } from './Content'; import { ContentDefinitionId } from './ContentDefinition'; import { ContentRepositoryId } from './ContentRepository'; import { MediaGalleryId } from './MediaGallery'; /** * This type represent the audit log unique id type */ export type AuditLogId = number; /** * This type represent the audit log item unique id types */ export type SubjectId = ContentId | ContentRepositoryId | ContentDefinitionId | MediaGalleryId | PublishingChannelId; /** * This type represent the audit log parent unique id types */ export type ParentId = ContentId | ContentRepositoryId | ContentDefinitionId | MediaGalleryId | PublishingChannelId; /** * This enum represent the audit log allowed */ export declare enum SubjectTypes { /** * When the subject is a repository this value will be returned */ repository = "repository", /** * When the subject is a content this value will be returned */ content = "content", /** * When the subject is a media gallery this value will be returned */ mediaGallery = "media_gallery", /** * When the subject is a content definition this value will be returned */ contentDefinition = "content_definition", /** * When the subject is a publishing channel this value will be returned */ publishingChannel = "publishing_channel" } /** * This enum represent the audit log parent allowed */ export declare enum ParentTypes { /** * When the parent is a repository this value will be returned */ repository = "repository", /** * When the parent is a content this value will be returned */ content = "content", /** * When the parent is a media gallery this value will be returned */ mediaGallery = "media_gallery", /** * When the parent is a content definition this value will be returned */ contentDefinition = "content_definition", /** * When the parent is a publishing channel this value will be returned */ publishingChannel = "publishing_channel" } /** * This enum represent the audit log actions allowed */ export declare enum SubjectActions { /** * When the action is a creation this value will be returned */ create = "create", /** * When the action is an update this value will be returned */ update = "update", /** * When the action is an archive this value will be returned */ archive = "archive", /** * When the action is an unarchive this value will be returned */ unarchive = "unarchive" } /** * This enum represent the audit log parent allowed types */ export type ListAuditLogRequest = { skip: number; take: number; filters?: ListAuditLogFilters; }; type LatestActivitesRequest = Omit & { filters: Omit; }; export type UserTeamLatestActivitiesRequest = LatestActivitesRequest<'userTeamLatestActivities'>; export type UserLatestActivitiesRequest = LatestActivitesRequest<'userLatestActivities'>; /** * This type represent all the filters used to filter a list of audit logs */ export type ListAuditLogFilters = { /** * A string that a audit log must contain to be retrieved */ name?: string; /** * The type subject to retrieve */ subjectType?: SubjectTypes; /** * The type of action to retrieve */ subjectAction?: SubjectActions; /** * If set to true, the response will contain only current user latest activities logs */ userLatestActivities?: boolean; /** * If set to true, the response will contain only teammates latest activities logs */ userTeamLatestActivities?: boolean; /** * The type of parent linked to the audit log to retrieve */ parentFilter?: ListAuditLogParentFilter; }; /** * The data needed to make a list of audit log filtered by repository */ export type ListByRepositoryIdRequest = { /** * The unique repository id */ repositoryId: ContentRepositoryId; } & (Partial | Partial); /** * The model the represent the audit log parent filter used in the list of audit logs */ export type ListAuditLogParentFilter = { /** * The unique parent id */ id: AuditLogId; /** * The parent if type */ parentType: SubjectTypes; }; /** * The model the represent the audit log item */ export type ListAuditLogItem = { /** * The unique audit log id */ id: AuditLogId; /** * The audit log subject unique id */ subjectId: SubjectId; /** * The audit log subject title */ subjectTitle: string; /** * The audit log subject type */ subjectType: SubjectTypes; /** * The audit log subject action */ subjectAction: SubjectActions; /** * The audit log subject parent unique id */ parentId?: ParentId; /** * The audit log subject parent type */ parentType?: ParentTypes; /** * The audit log creation date */ createdDate: Date; /** * The author that made the subject action */ actionAuthor: AuthorResponse; /** * The date of the subject action */ actionDate: Date; }; /** * This type represent the response of a list audit log API request */ export type ListAuditLogResponse = PagedListResponse; export {};