/** * Discovery of exportable data units on a B2C Commerce instance. * * Lists the IDs that can be selected when building an * {@link ExportDataUnitsConfiguration} for a site archive export — sites, * catalogs, and inventory lists. These are the data-unit categories for which * OCAPI exposes a "list all" endpoint. * * Categories without a list-all OCAPI endpoint (libraries, customer lists, * price books) are not discoverable and must be entered by ID. */ import { B2CInstance } from '../../instance/index.js'; /** * IDs discovered on an instance, grouped by data-unit category. Each list is * sorted alphabetically. A category that could not be read (e.g. missing OCAPI * permission) is returned as an empty array with a matching entry in * {@link ExportableUnits.warnings}. */ export interface ExportableUnits { /** Site IDs (from `GET /sites`). */ sites: string[]; /** Catalog IDs (from `GET /catalogs`). */ catalogs: string[]; /** Inventory list IDs (from `GET /inventory_lists`). */ inventoryLists: string[]; /** Per-category warnings for endpoints that failed (e.g. permission denied). */ warnings: string[]; } /** * Discovers the data units that can be exported from an instance. * * Each category is read independently: a failure in one (e.g. the OCAPI client * lacks read permission for catalogs) records a warning and leaves that list * empty rather than failing the whole discovery, so the caller can still offer * the categories that succeeded. * * @param instance - B2C instance to query * @returns Discovered IDs grouped by category, with per-category warnings * * @example * ```typescript * const units = await discoverExportableUnits(instance); * console.log(units.catalogs); // ['storefront-catalog', 'master-catalog'] * ``` */ export declare function discoverExportableUnits(instance: B2CInstance): Promise;