UNPKG

dc-management-sdk-js

Version:
222 lines (221 loc) 7.95 kB
import { HalResource } from '../hal/models/HalResource'; import { FacetedContentItem } from './ContentItem'; import { ContentRepository } from './ContentRepository'; import { ContentType } from './ContentType'; import { ContentTypeSchema } from './ContentTypeSchema'; import { Edition } from './Edition'; import { Event } from './Event'; import { FacetQuery, FacetsResponse } from './Facets'; import { FindByDate } from './FindByDate'; import { Page } from './Page'; import { Pageable } from './Pageable'; import { SearchIndex } from './SearchIndex'; import { Sortable } from './Sortable'; import { Status } from './Status'; import { Settings } from './Settings'; import { Webhook } from './Webhook'; import { WorkflowState } from './WorkflowState'; import { Extension } from './Extension'; import { Snapshot } from './Snapshot'; import { SnapshotResultList } from './SnapshotResultList'; import { StatusFilterable } from './StatusFilterable'; /** * Class representing the [Hub](https://amplience.com/docs/api/dynamic-content/management/#resources-hubs) resource. * Hubs are containers for multiple repositories including media, content, content types. */ export declare class Hub extends HalResource { /** * Unique id generated on creation */ id?: string; /** * Globally unique programmatic name for the Hub */ name?: string; /** * Friendly display label for the Hub */ label?: string; /** * Textual description of the Hub */ description?: string; /** * Lifecycle status of the Hub */ status?: Status; /** * Id of the user responsible for originally creating the Hub */ createdBy?: string; /** * Timestamp representing when the Hub was originally created in ISO 8601 format */ createdDate?: string; /** * Id of the user responsible for the last update to the Hub */ lastModifiedBy?: string; /** * Timestamp representing when the Hub was last updated in ISO 8601 format */ lastModifiedDate?: string; /** * Hub settings */ settings?: Settings; /** * Resources and actions related to a Hub */ readonly related: { contentTypeSchema: { /** * Creates a new Content Type Schema * @param resource */ create: (resource: ContentTypeSchema) => Promise<ContentTypeSchema>; /** * Retrieves a list of Content Type Schemas associated with this Hub * @param options Pagination options */ list: (options?: Pageable) => Promise<Page<ContentTypeSchema>>; }; contentRepositories: { /** * Retrieves a list of Content Repositories associated with this Hub * @param options Pagination options */ list: (options?: Pageable & Sortable) => Promise<Page<ContentRepository>>; /** * Find all the Content Repositories that contain a feature * @param options Options */ findByFeature: (feature: string, options?: Pageable & Sortable) => Promise<Page<ContentRepository>>; }; contentTypes: { /** * Retrieves a list of Content Types associated with this Hub * @param options Pagination options */ list: (options?: Pageable & Sortable & StatusFilterable) => Promise<Page<ContentType>>; /** * Register a Content Type on a hub so it can be enabled on a repository */ register: (resource: ContentType) => Promise<ContentType>; /** * Get a content type by its id */ get: (id: string) => Promise<ContentType>; }; contentItems: { /** * Facet content items and search by text. See [Text Search Query Syntax](https://amplience.com/docs/api/dynamic-content/management/#section/Text-Search-Query-Syntax) for a summary of the query syntax. */ facet: (facetQuery: FacetQuery, options?: Pageable & Sortable & { query: string; }) => Promise<FacetsResponse<FacetedContentItem>>; }; editions: { /** * Find editions by date associated with this Hub * @param options FindByDate & Pageable & Sortable options */ findByDate: (options?: FindByDate & Pageable & Sortable, projection?: string) => Promise<Page<Edition>>; }; events: { /** * Creates an Event inside this Hub * @param resource */ create: (resource: Event) => Promise<Event>; /** * Retrieves a list of Events associated with this Hub * @param options Pagination options */ list: (options?: Pageable & Sortable) => Promise<Page<Event>>; }; extensions: { /** * Creates an Extension inside this Hub * @param resource */ create: (resource: Extension) => Promise<Extension>; /** * Get an Extension inside this Hub by its name */ getByName: (name: string) => Promise<Extension>; /** * Retrieves a list of Extension associated with this Hub * @param options Pagination options */ list: (options?: Pageable & Sortable) => Promise<Page<Extension>>; }; searchIndexes: { /** * Create a search index for a given hub * @param resource */ create: (resource: SearchIndex) => Promise<SearchIndex>; /** * Get a search index by its id */ get: (id: string) => Promise<SearchIndex>; /** * Retrieves a list of search indexes associated with this Hub */ list: (parentId?: string, projection?: string, options?: Pageable & Sortable) => Promise<Page<SearchIndex>>; }; settings: { /** * Updates this hub settings with the changes in the mutation parameter. */ update: (mutation: Settings) => Promise<Settings>; }; snapshots: { /** * Creates a Snapshot inside this Hub * @param request */ create: (request: Snapshot[]) => Promise<SnapshotResultList>; }; webhooks: { /** * Creates a Webhook inside this Hub * @param resource */ create: (resource: Webhook) => Promise<Webhook>; /** * Get a Webhook inside this Hub by its id */ get: (id: string) => Promise<Webhook>; /** * Retrieves a list of Webhooks associated with this Hub * @param options Pagination options */ list: (options?: Pageable & Sortable) => Promise<Page<Webhook>>; }; workflowStates: { /** * Creates a Workflow State inside this Hub * @param resource */ create: (resource: WorkflowState) => Promise<WorkflowState>; /** * Get a Webhook State insidee this Hub by its id * @param id */ get: (id: string) => Promise<WorkflowState>; /** * Retrieves a list of Workflow States associated with this Hub * @param options Pagination options */ list: (options?: Pageable & Sortable) => Promise<Page<WorkflowState>>; }; }; } /** * @hidden */ export declare class HubsPage extends Page<Hub> { constructor(data?: any); }