import { AuthorResponse } from './Author'; import { PagedListResponse } from './common'; /** * This type represent the unique content repository id type */ export type ContentRepositoryId = number; /** * This type represent the model of a content repository */ export type ContentRepositoryResponse = { /** * The unique content repository id */ id: ContentRepositoryId; /** * The content repository name */ name: string; /** * The content repository mnemonic id */ mnemonicId: string; /** * The content repository color */ color: string; /** * The content repository description */ description: string; /** * The content repository creation date */ createdDate: Date; /** * The content repository last modified date */ lastModifiedDate: Date; /** * The content repository last modified author */ latestContributor: AuthorResponse; /** * The archived status of the content repository */ archived: boolean; /** * The archive date of the content repository */ archivedDate: Date | null; }; /** * This type represent all possible filters used to retrieve a list of content repository */ export type ListContentRepositoryFilters = { /** * This filter is used to search a media gallery that contain the value inserted */ name?: string; /** * This filter is used to retrieve archived or not archived media gallery */ archived?: boolean; }; /** * This type represent the data needed to make a list content repository API request */ export type ListContentRepositoriesRequest = { /** * The number of content repository to skip (this value is used for pagination) */ skip: number; /** * The number of content repository to take (this value is used for pagination) */ take: number; /** * The data used to filter the list of content repository */ filters: ListContentRepositoryFilters; }; /** * This type represent the item of a list content repository API request */ export type ListContentRepositoriesItem = CreateContentRepositoryResponse; /** * This type represent the response of a list content repository API request */ export type ListContentRepositoriesResponse = PagedListResponse; /** * This type represent the data needed to make a create content repository API request */ export type CreateContentRepositoryRequest = { /** * The content repository name */ name: string; /** * The content repository mnemonic id */ mnemonicId: string; /** * The content repository color */ color?: string; /** * The content repository description */ description: string; }; /** * This type represent the response of a create content repository API request */ export type CreateContentRepositoryResponse = { /** * The content repository unique id */ id: ContentRepositoryId; /** * The content repository name */ name: string; /** * The content repository mnemonic id */ mnemonicId: string; /** * The content repository color */ color: string; /** * The content repository description */ description: string; /** * The content repository author */ author: AuthorResponse; /** * The content repository creation date */ createdDate: Date; /** * The content repository last modified date */ lastModifiedDate: Date; /** * The content repository last modified author */ latestContributor: AuthorResponse; }; /** * This type represent the data needed to make a content repository summary API request */ export type ContentRepositorySummaryRequest = { /** * The content repository unique id to retrieve the summary data */ id: ContentRepositoryId; }; /** * This type represent the response of a content repository summary API request */ export type ContentRepositorySummaryResponse = { /** * The content repository unique id of the summary */ id: ContentRepositoryId; /** * The content repository name of the summary */ name: string; /** * The content repository mnemonic id of the summary */ mnemonicId: string; /** * The content repository color of the summary */ color: string; /** * The content repository description of the summary */ description: string; /** * The number of contents saved inside this repository */ contents: number; }; /** * This type represent the data needed to make a get content repository API request */ export type GetContentRepositoryRequest = { /** * The unique content repository id to retrieve */ id: number; }; /** * This type represent the response of a get content repository API request */ export type GetContentRepositoryResponse = ContentRepositoryResponse; /** * This type represent the data needed to make an update content repository API request */ export type UpdateContentRepositoryRequest = { /** * The content repository unique id */ id: ContentRepositoryId; /** * The content repository name to update */ name: string; /** * The content repository mnemonic id */ mnemonicId: string; /** * The content repository color to update */ color: string; /** * The content repository description to update */ description: string; }; /** * This type represent the response of an update content repository API request */ export type UpdateContentRepositoryResponse = ContentRepositoryResponse; /** * This type represent the data needed to make a toggle archived content repository API request */ export type ToggleArchivedContentRepositoryRequest = { /** * The content repository unique id */ id: ContentRepositoryId; /** * This value represent the archive status to set in the specified content repository */ archived: boolean; }; /** * This type represent the response of a toggle archived content repository API request */ export type ToggleArchivedContentRepositoryResponse = ContentRepositoryResponse;