@orangelogic/orange-dam-content-browser-sdk 2.4.12 → 2.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import type { AssetLinkError } from '../api/asset/asset';
2
+ export type CxContentBrowserAssetLinkErrorEvent = CustomEvent<{
3
+ error: AssetLinkError;
4
+ }>;
5
+ declare global {
6
+ interface GlobalEventHandlersEventMap {
7
+ 'cx-content-browser-asset-link-error': CxContentBrowserAssetLinkErrorEvent;
8
+ }
9
+ }
@@ -1,5 +1,6 @@
1
1
  export * from '@orangelogic/design-system/events';
2
2
  export * from './cx-content-browser-asset-card-click';
3
+ export * from './cx-content-browser-asset-link-error';
3
4
  export * from './cx-content-browser-asset-tracking-parameters-change';
4
5
  export * from './cx-content-browser-control-bar-search-change';
5
6
  export * from './cx-content-browser-control-filter-change';
package/build/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import './styles.css';
2
2
  export { default as CxContentBrowser } from './components/content-browser/content-browser';
3
+ export { AssetLinkError } from './api/asset/asset';
3
4
  import { AppContextType } from './AppContext';
4
5
  import { CtaTextTransform, ImageCardDisplayInfo } from './GlobalConfigContext';
5
6
  import { type AutoSelectFormat, TableColumn, type TableRowActionPosition, type TitleFallback } from './types/content-browser';
@@ -23,7 +24,9 @@ type OrangeDAMContentBrowser = {
23
24
  */
24
25
  onAppAuthUrlCopied?: AppContextType['onAppAuthUrlCopied'];
25
26
  /**
26
- * Callback when we have any error while using content browser
27
+ * Callback when we have any error while using content browser.
28
+ * When the asset link request of a confirm fails, `error` is an `AssetLinkError`.
29
+ * Its `errorCode` holds the Cortex error code (for example `OL_ERR_002_NOTALLOWED`) when Cortex sent one.
27
30
  */
28
31
  onError?: AppContextType['onError'];
29
32
  /**