@acoustic-content-sdk/api
v9.0.10076
Published
Interfaces and constants to support the Acoustic sites SDK and related modules.
Downloads
387
Readme
Interfaces and constants to support the Acoustic sites SDK and related modules.
Home > @acoustic-content-sdk/api
api package
Interfaces and constants to support the Acoustic sites SDK and related modules.
Enumerations
| Enumeration | Description | | --- | --- | | CYCLE_HANDLING | Cycle handling strategy | | DraftStatus | Possible values for draft status | | SdkMode | | | Status | | | TENANT_TIER | |
Functions
| Function | Description | | --- | --- | | createVersion(aVersionString, aBuildDate) | Constructs a version object from a version string and a build date | | createVersionString(aVersion) | Converts the version object into a version string |
Interfaces
| Interface | Description | | --- | --- | | AbstractElement | | | ActivePage | | | ActivePageV2 | | | Asset | | | AssetPublishApproval | | | AuthoringAsset | | | AuthoringAssetMetadata | | | AuthoringAssetProfileRendition | | | AuthoringCategoryElement | | | AuthoringCommerceProductCategoryElement | | | AuthoringCommerceProductElement | | | AuthoringContentItem | | | AuthoringContentItemThumbnail | | | AuthoringContentThumbnail | | | AuthoringDatetimeElement | | | AuthoringElement | | | AuthoringFileElement | | | AuthoringFormattedTextElement | | | AuthoringGroup | | | AuthoringGroupElement | | | AuthoringImage | | | AuthoringImageElement | | | AuthoringLayout | | | AuthoringLayoutItem | | | AuthoringLayoutMapping | | | AuthoringLayoutMappingLayout | | | AuthoringLayoutMappingMapping | | | AuthoringLayoutMappingType | | | AuthoringLinkElement | | | AuthoringLocationElement | | | AuthoringNumberElement | | | AuthoringOption | | | AuthoringOptionSelectionElement | | | AuthoringPlaceholder | | | AuthoringReference | | | AuthoringReferenceElement | | | AuthoringReferenceValue | | | AuthoringSelectedLayout | | | AuthoringText | | | AuthoringTextElement | | | AuthoringThumbnail | | | AuthoringToggleElement | | | AuthoringType | | | AuthoringUiExtensions | | | AuthoringVariableTypeElement | | | AuthoringVideo | | | AuthoringVideoElement | | | AuthStatus | Exposes the authentication status | | BaseAuthoringItem | Base interface for all items | | BaseDeliveryItem | Base interface for all items | | Category | Category is a reference element. The contents that are stored in the category element are references to categories created in content hub. When ?include=metadata is used, the categories property is included which has the full name path for each selected category.Note: When you set categories on the category element, you need to add the UUID of the category to the categoryIds property. The categories property, which returns the name path of the category is a read-only property and is not used when the content is updated. If you set it during an update, it is ignored. | | CategoryElement | Category is a reference element. The contents that are stored in the category element are references to categories created in content hub. When ?include=metadata is used, the categories property is included which has the full name path for each selected category.Note: When you set categories on the category element, you need to add the UUID of the category to the categoryIds property. The categories property, which returns the name path of the category is a read-only property and is not used when the content is updated. If you set it during an update, it is ignored. | | ContentItem | Representation of a generic content item. | | ContentItemWithLayout | | | ContentPublishApproval | | | DateElement | Common base class for all date elements | | DeliveryAccess | | | DeliveryAsset | | | DeliveryCategoryElement | | | DeliveryContentItem | | | DeliveryContentMetadata | Common fields in all metadata records | | DeliveryFileElement | | | DeliveryGroupElement | | | DeliveryGroupElementMetadata | | | DeliveryImageAsset | | | DeliveryImageCrop | | | DeliveryImageElement | | | DeliveryImageRendition | | | DeliveryImageTransform | | | DeliveryLayoutRef | | | DeliveryLinkElement | | | DeliveryLocationElement | | | DeliveryReferenceElement | | | DeliveryReferenceElementMetadata | | | DeliverySelectedLayout | | | DeliveryThumbnail | | | DeliveryVideoElement | | | DynamicLoggerFactory | Instantiator for loggers. Clients of the SDK can use this interface to inject their custom logger implementation. | | ElementMap | | | ElementWithMarkup | | | ErrorDetail | | | ErrorResponse | JSON structure of an error response | | ExtendedContext | | | ExtendedContextV2 | | | File | | | FileElement | Common base class for all file elements | | FormattedTextElement | Common base class for all text elements | | Group | Interface that represents a grouping of elements | | GroupElement | Common base class for all group elements | | HttpResourceOptions | | | HubContext | | | HubInfo | Exposes information required to access the content hub REST API. This information can be obtained via the 'Watson Content Hub information' section. | | HubInfoConfig | Base class for services providing hub information. We need a base class to be able to specify this service as injectable | | IbmCommerce | | | Image | | | ImageElement | Common base class for all image elements | | Layout | Representation of a layout descriptor in the delivery artifacts | | Link | | | LinkElement | Common base class for all link elements | | Location | | | LocationElement | | | Logger | Abstraction of the logger interface, trying to be as generic as possible. The identity of the logger is passed at creation time via the factory. Note that this interface is compatible to the console instance. | | LoggerFactory | Instantiator for loggers. Clients of the SDK can use this interface to inject their custom logger implementation. | | LoggerService | Service to return a logger for a given name. Calling the getter multiple times with the same name will return the same instance of the logger. | | MultiDateElement | Date element uses a string property, the value must be an ISO 8601 date time. | | MultiFileElement | | | MultiFormattedTextElement | The text element holds text value in a JSON string. | | MultiGroupElement | The text element holds text value in a JSON string. | | MultiImageElement | | | MultiLinkElement | Link element has three text fields linkURL, linkText, and linkDescription. | | MultiNumberElement | The Number element stores the value in the JSON as a number type. | | MultiOptionSelectionElement | The text element holds text value in a JSON string. | | MultiProductElement | The text element holds text value in a JSON string. | | MultiReferenceElement | | | MultiTextElement | The text element holds text value in a JSON string. | | MultiToggleElement | Toggle just uses JSON Boolean. | | MultiVideoElement | | | NumberElement | Common base class for all number elements | | OptionSelection | Representation of a selection | | OptionSelectionElement | Common base class for all options election elements | | PageSearchResult | | | ProductElement | | | Query | | | ReferenceElement | Common base class for all reference elements | | RenderingContext | | | RenderingContextGroupElement | | | RenderingContextInterceptor | Interceptor that can expose transforms for the rendering contexts. | | RenderingContextProvider | | | RenderingContextProviderV2 | | | RenderingContextQueryResult | | | RenderingContextReferenceElement | | | RenderingContextSearchResult | | | RenderingContextV2 | | | Rendition | | | Resource | | | SdkActiveRouteEvent | | | SdkErrorResponse | Response sent when processing a message fails | | SdkMessageHandler | | | SdkMessagePayload | Base interfaces for events that can be sent to the SDK | | SdkModeEvent | | | SdkNavigateByPathEvent | | | SdkNavigateByPathResponse | Response to the navigation event | | SdkRefreshEvent | | | SdkRouteEvent | | | SdkSetModeEvent | | | SdkSetModeResponse | Response to the set mode event | | SdkSubscribeActiveRouteEvent | | | SdkSubscribeActiveRouteEventResponse | | | SdkSubscribeEventResponse | Response to a subscription | | SdkSubscribeModeEvent | | | SdkSubscribeModeEventResponse | | | SdkSubscribeRouteEvent | | | SdkSubscribeRouteEventResponse | | | SdkUnsubscribeEvent | | | SearchResult | | | SearchResults | | | SingleDateElement | Date element uses a string property, the value must be an ISO 8601 date time. | | SingleFileElement | File element is the most basic asset reference element. It is a reference element that is used to point to an asset in content hub. Except for asset ID, all the other properties are read-only and are added from the asset at the time it is selected on a content.With asset references most of the properties are read-only and come from the asset. So when you set a file on file element you need to set the asset.id property. The other information is fetched automatically by the content service and stored in read-only fields. | | SingleFormattedTextElement | The text element holds text value in a JSON string. | | SingleGroupElement | The text element holds group value in a JSON string. | | SingleImageElement | Image is one of the more complex elements and the following section describes a normal image without an image profile configured. For information on updating and formatting the image element, go to Updating image element format.Note: You are always selecting a rendition of an asset and not the asset directly. As a result interactions with image elements involve setting and updating a rendition reference. Most other fields that are displayed in image element are read only! | | SingleLinkElement | Link element has three text fields linkURL, linkText, and linkDescription. | | SingleNumberElement | The Number element stores the value in the JSON as a number type. | | SingleOptionSelectionElement | The text element holds text value in a JSON string. | | SingleProductElement | The text element holds text value in a JSON string. | | SingleReferenceElement | | | SingleTextElement | The text element holds text value in a JSON string. | | SingleToggleElement | Toggle just uses JSON Boolean. | | SingleVideoElement | Standard video element is similar to the file element. The video asset is represented in the asset section. Optionally a video asset can have a caption and a thumbnail as well, and in this case both of these point two resources in content hub. As mentioned with file, most of the properties here are inlined data from the asset/resource and is read-only. To update a video asset or its caption/thumbnail update the relevant asset/resource ID. The related information is retrieved again and added. Attempts to change the read-only fields are ignored. | | Site | | | SiteChild | | | SiteContext | | | SiteDeliveryContentItem | | | SiteNavigationDeliveryContentItem | Delivery record for the site content item843fb991-7413-4517-bfcb-b59fc4b1f449 | | SiteNavigationPage | Reference to a page in the site navigation | | SitePage | | | SitePagesQueryResult | | | SiteRoot | | | Tenant | | | TextElement | Common base class for all text elements | | ToggleElement | Common base class for all toggle elements | | TypeRef | Reference to a content type | | UrlConfig | Exposes the URL configuration to the client.See HubInfoConfig | | User | Representation of a user | | Video | | | VideoElement | Common base class for all video elements | | WchHttp | | | WchSdk | | | WchSdkRouter | | | WchSdkSearch | | | WchSdkVersion | Defines the version number and the build date of the SDK. |
Variables
| Variable | Description | | --- | --- | | ACOUSTIC_CONFIG_API_URL | Name of the 'rel' attribute of a link element used to configure the API URL | | ACOUSTIC_CONFIG_BASE_URL | Name of the 'rel' attribute of a link element used to configure the base URL | | ACOUSTIC_CONFIG_RESOURCE_URL | Name of the 'rel' attribute of a link element used to configure the delivery URL | | ACOUSTIC_SDK_MODULE_NAME | | | CLASSIFICATION_ASSET | | | CLASSIFICATION_CONTENT_TYPE | | | CLASSIFICATION_CONTENT | | | CLASSIFICATION_LAYOUT_MAPPING | | | CLASSIFICATION_LAYOUT | | | CLASSIFICATION_PAGE | | | ELEMENT_TYPE_CATEGORY | | | ELEMENT_TYPE_DATE | | | ELEMENT_TYPE_FILE | | | ELEMENT_TYPE_FORMATTED_TEXT | | | ELEMENT_TYPE_GROUP | | | ELEMENT_TYPE_IMAGE | | | ELEMENT_TYPE_LINK | | | ELEMENT_TYPE_LOCATION | | | ELEMENT_TYPE_NUMBER | | | ELEMENT_TYPE_OPTION_SELECTION | | | ELEMENT_TYPE_PRODUCT | | | ELEMENT_TYPE_REFERENCE | | | ELEMENT_TYPE_TEXT | | | ELEMENT_TYPE_TOGGLE | | | ELEMENT_TYPE_VARIABLE | | | ELEMENT_TYPE_VIDEO | | | HEADER_BASICAUTH_TENANT_ID | | | KEY_ACCEPT_PRIVACY_NOTICE | | | KEY_ACCESSOR | | | KEY_ACOUSTIC_SEED | | | KEY_BASICAUTH_LOGIN_PASSWORD | | | KEY_BASICAUTH_LOGIN_USERNAME | | | KEY_CREATOR_ID | | | KEY_ELEMENT_TYPE | | | KEY_ID | | | KEY_METADATA | | | KEY_NAME | | | KEY_STATUS | | | KEY_TYPE_ID | | | KEY_TYPE_REF | | | KEY_VALUE | | | KEY_VALUES | | | MODULE | Module name | | PARAM_REDIRECT_LOGIN_TARGET_TENANT | | | PARAM_REDIRECT_LOGIN_TARGET_URL | | | REGEXP_ANONYMOUS_USER_ID | | | REL_PATH_BASICAUTH_LOGIN | | | REL_PATH_CURRENT_TENANT | | | REL_PATH_CURRENT_USER | | | REL_PATH_REDIRECT_LOGIN | | | REL_PATH_REMOVECOOKIES | | | REL_PATH_TYPE_BY_ID | | | SDK_ACTIVE_ROUTE_EVENT_TYPE | Event sent to denote a modification of the active route | | SDK_MODE_EVENT_TYPE | Event sent to denote the active mode | | SDK_NAVIGATE_BY_PATH_EVENT_TYPE | Event that triggers a navigation | | SDK_REFRESH_EVENT_TYPE | Event that triggers a refresh | | SDK_ROUTE_EVENT_TYPE | Event sent to denote a modification of the route | | SDK_SET_MODE_EVENT_TYPE | Event that modifies the SDK mode between using public or private routes | | SDK_SUBSCRIBE_ACTIVE_ROUTE_EVENT_TYPE | Event that subscribes a listener for an active route | | SDK_SUBSCRIBE_MODE_EVENT_TYPE | Event that subscribes a listener for modes | | SDK_SUBSCRIBE_ROUTE_EVENT_TYPE | Event that subscribes a listener for a specific route | | SDK_UNSUBSCRIBE_EVENT_TYPE | Event that unsubscribes a listener | | SEARCH_FL_DOCUMENT | Constant to get the full document from the search result | | VALUE_ACCEPT_PRIVACY_NOTICE | | | VERSION | Version and build number of the package |
Type Aliases
| Type Alias | Description | | --- | --- | | AUTHORING_CONTENT_ITEM_KIND | | | AUTHORING_ELEMENT_DATETIME_SEARCH_KEY | | | AUTHORING_ELEMENT_FILE_TYPE | | | AUTHORING_ELEMENT_IMAGE_TYPE | | | AUTHORING_ELEMENT_LOCATION_SEARCH_KEY | | | AUTHORING_ELEMENT_NUMBER_SEARCH_KEY | | | AUTHORING_ELEMENT_ROLE | | | AUTHORING_ELEMENT_TEXT_SEARCH_KEY | | | AUTHORING_ELEMENT_TOGGLE_SEARCH_KEY | | | AUTHORING_ELEMENT_VIDEO_TYPE | | | AUTHORING_TYPE_KIND | Possible values kind | | CONTENT_ITEM_KIND | | | DeliveryDateElement | | | DeliveryElement | | | DeliveryFileAsset | | | DeliveryFormattedTextElement | | | DeliveryImageMode | | | DeliveryImageScale | | | DeliveryLayout | | | DeliveryLayoutMapping | | | DeliveryNumberElement | | | DeliveryOptionsElement | | | DeliverySelectedLayouts | | | DeliveryTextElement | | | DeliveryToggleElement | | | DeliveryType | | | ELEMENT_TYPE | | | Element | An element is one of the following | | GroupType | | | HubInfoUrlProvider | | | Layouts | Ordering of the layouts per layout mode | | Locale | Helper type to identify a locale in the interfaces | | Localized | Object supporting localizations | | LocalizedContext | Localization context that describes the relevance of a locale, this is typically derived from the accept language header | | LocalizedText | Text with attached locale | | MultiDeliveryElements | | | MultiRenderingContextElements | | | QueryInput | | | QueryValue | acceptable values for | | RenderingContextElements | | | SdkMessageHandlerCallback | | | SimpleType | | | SingleDeliveryElements | | | SingleRenderingContextElements | | | SiteNavigation | The list of root pages | | StaticHubInfoUrlProvider | Defines the provider of a URL, either as a URL, a string or a callback that generates either |
Home > @acoustic-content-sdk/api > CYCLE_HANDLING
CYCLE_HANDLING enum
Cycle handling strategy
Signature:
export declare enum CYCLE_HANDLING
Enumeration Members
| Member | Value | Description | | --- | --- | --- | | BREAK | 0 | Stop rendering contexts at detected cycles | | RESOLVE | 1 | Resolve cycles by building cyclic in-memory structures |
Home > @acoustic-content-sdk/api > DraftStatus
DraftStatus enum
Possible values for draft status
Signature:
export declare enum DraftStatus
Enumeration Members
| Member | Value | Description | | --- | --- | --- | | APPROVED | "approved" | | | IN_PROGRESS | "in-progress" | | | IN_REVIEW | "in-review" | |
Home > @acoustic-content-sdk/api > SdkMode
SdkMode enum
Signature:
export declare enum SdkMode
Enumeration Members
| Member | Value | Description | | --- | --- | --- | | PROTECTED | "protected" | | | PUBLIC | "public" | |
Home > @acoustic-content-sdk/api > Status
Status enum
Signature:
export declare enum Status
Enumeration Members
| Member | Value | Description | | --- | --- | --- | | DRAFT | "draft" | | | READY | "ready" | | | RETIRED | "retired" | |
Home > @acoustic-content-sdk/api > TENANT_TIER
TENANT_TIER enum
Signature:
export declare enum TENANT_TIER
Enumeration Members
| Member | Value | Description | | --- | --- | --- | | BASE | "Base" | | | PLUS | "Plus" | | | STANDARD | "Standard" | | | TRIAL | "Trial" | |
Home > @acoustic-content-sdk/api > createVersion
createVersion() function
Warning: This API is now obsolete.
Constructs a version object from a version string and a build date
Signature:
export declare function createVersion(aVersionString: string, aBuildDate: string): WchSdkVersion;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aVersionString | string | the version string such as in package json | | aBuildDate | string | the build date in ISO format |
Returns:
WchSdkVersion
the SDK version object
Home > @acoustic-content-sdk/api > createVersionString
createVersionString() function
Converts the version object into a version string
Signature:
export declare function createVersionString(aVersion: WchSdkVersion): string;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aVersion | WchSdkVersion | the version object |
Returns:
string
the version string
Home > @acoustic-content-sdk/api > AbstractElement
AbstractElement interface
Signature:
export interface AbstractElement
Properties
| Property | Type | Description | | --- | --- | --- | | elementType | ELEMENT_TYPE | |
Home > @acoustic-content-sdk/api > ActivePage
ActivePage interface
Signature:
export interface ActivePage extends RenderingContextProvider
Properties
| Property | Type | Description | | --- | --- | --- | | onRenderingContext | Observable<RenderingContext> | Retrieves the rendering context for the content item rendered for the currently selected page. |
Home > @acoustic-content-sdk/api > ActivePageV2
ActivePageV2 interface
Signature:
export interface ActivePageV2 extends RenderingContextProviderV2
Properties
| Property | Type | Description | | --- | --- | --- | | renderingContext$ | Observable<RenderingContextV2> | Retrieves the rendering context for the content item rendered for the currently selected page. |
Home > @acoustic-content-sdk/api > Asset
Asset interface
Signature:
export interface Asset
Properties
| Property | Type | Description | | --- | --- | --- | | altText | string | | | fileName | string | | | fileSize | number | | | height | number | | | id | string | | | mediaType | string | | | resourceUri | string | | | width | number | added by delivery |
Home > @acoustic-content-sdk/api > AssetPublishApproval
AssetPublishApproval interface
Signature:
export interface AssetPublishApproval
Properties
| Property | Type | Description | | --- | --- | --- | | enabled | boolean | True if mandatory approval is enabled | | exemptAssetTypes | string[] | |
Home > @acoustic-content-sdk/api > AuthoringAsset
AuthoringAsset interface
Signature:
export interface AuthoringAsset extends BaseAuthoringItem
Properties
| Property | Type | Description | | --- | --- | --- | | altText | string | | | assetType | string | | | caption | string | | | classification | 'asset' | The classification defines the document type. For content items, all documents are classified as "content". | | digest | string | | | fileName | string | | | fileSize | number | | | isManaged | boolean | | | mediaType | string | | | metadata | AuthoringAssetMetadata | | | path | string | | | profileRenditions | AuthoringAssetProfileRendition[] | | | resource | string | |
Home > @acoustic-content-sdk/api > AuthoringAssetMetadata
AuthoringAssetMetadata interface
Signature:
export interface AuthoringAssetMetadata
Properties
| Property | Type | Description | | --- | --- | --- | | camera | any | | | coverage | any | | | creator | string | | | description | string | | | headline | string | | | heigth | number | | | publisher | string | | | rights | string | | | source | string | | | subject | string[] | | | title | string | | | width | number | |
Home > @acoustic-content-sdk/api > AuthoringAssetProfileRendition
AuthoringAssetProfileRendition interface
Signature:
export interface AuthoringAssetProfileRendition
Properties
| Property | Type | Description | | --- | --- | --- | | height | number | | | key | string | | | profileId | string | | | transform | any | | | uri | string | | | width | number | |
Home > @acoustic-content-sdk/api > AuthoringCategoryElement
AuthoringCategoryElement interface
Signature:
export interface AuthoringCategoryElement extends AuthoringElement
Properties
| Property | Type | Description | | --- | --- | --- | | elementType | 'category' | | | restrictedParents | string[] | | | searchKey | AUTHORING_ELEMENT_TEXT_SEARCH_KEY | |
Home > @acoustic-content-sdk/api > AuthoringCommerceProductCategoryElement
AuthoringCommerceProductCategoryElement interface
Signature:
export interface AuthoringCommerceProductCategoryElement extends AuthoringElement
Properties
| Property | Type | Description | | --- | --- | --- | | elementType | 'productcategory' | | | restrictedParent | string | | | searchKey | AUTHORING_ELEMENT_TEXT_SEARCH_KEY | |
Home > @acoustic-content-sdk/api > AuthoringCommerceProductElement
AuthoringCommerceProductElement interface
Signature:
export interface AuthoringCommerceProductElement extends AuthoringElement
Properties
| Property | Type | Description | | --- | --- | --- | | elementType | 'product' | | | restrictedCategories | string[] | | | searchKey | AUTHORING_ELEMENT_TEXT_SEARCH_KEY | |
Home > @acoustic-content-sdk/api > AuthoringContentItem
AuthoringContentItem interface
Signature:
export interface AuthoringContentItem extends BaseAuthoringItem
Properties
| Property | Type | Description | | --- | --- | --- | | classification | 'content' | | | deliveryAccess | 'secured' | | | draftStatus | DraftStatus | | | elements | Record<string, any> | | | form | any[] | | | id | string | | | keywords | string[] | | | kind | AUTHORING_CONTENT_ITEM_KIND[] | | | lastModified | string | | | lastModifier | string | | | lastModifierId | string | | | linkedDocId | string | | | links | Record<string, any> | | | locale | string | | | projectId | string | | | projects | string[] | | | publishing | Record<string, any> | | | review | Record<string, any> | | | reviewHistory | string[] | | | reviewId | string | | | schema | Record<string, any> | | | selectedLayouts | AuthoringSelectedLayout[] | | | status | Status | | | systemModified | string | | | tags | string[] | | | thumbnail | AuthoringContentItemThumbnail | | | type | string | | | typeId | string | | | valid | boolean | |
Home > @acoustic-content-sdk/api > AuthoringContentItemThumbnail
AuthoringContentItemThumbnail interface
Signature:
export interface AuthoringContentItemThumbnail extends AuthoringThumbnail
Properties
| Property | Type | Description | | --- | --- | --- | | id | string | |
Home > @acoustic-content-sdk/api > AuthoringContentThumbnail
AuthoringContentThumbnail interface
Signature:
export interface AuthoringContentThumbnail
Properties
| Property | Type | Description | | --- | --- | --- | | imageElement | string | | | source | 'imageElementOrType' | 'imageElement' | 'type' | 'none' | |
Home > @acoustic-content-sdk/api > AuthoringDatetimeElement
AuthoringDatetimeElement interface
Signature:
export interface AuthoringDatetimeElement extends AuthoringElement
Properties
| Property | Type | Description | | --- | --- | --- | | elementType | 'datetime' | | | fieldType | 'date' | 'date-time' | | | searchKey | AUTHORING_ELEMENT_DATETIME_SEARCH_KEY | |
Home > @acoustic-content-sdk/api > AuthoringElement
AuthoringElement interface
Signature:
export interface AuthoringElement
Properties
| Property | Type | Description | | --- | --- | --- | | allowMultipleValues | boolean