• Parses the config.json produced by the Showpad experience app editor into the platform’s enriched runtime schema.

    ⚠️ This method is only applicable to apps built with the standard Showpad experience app editor. If your app uses a Custom Editor, use getConfig instead. Calling it with a Custom Editor config throws an error.

    This function builds on parseConfig and additionally enriches every asset with its fileUrl, previewUrl and thumbnailUrl, resolved for the current platform.

    ⚠️ This output is intended for runtime use only. The resolved URLs depend on the platform and session, so it should not be persisted or assumed to be stable across sessions or environments.

    Consumers may extend the base configuration type to include additional application-specific fields via generics.

    Throws

    If the config was not created with the standard Showpad experience app editor (e.g. a Custom Editor config). Use getConfig instead.

    Example

    // config.json
    {
    "version": 1,
    "labels": {
    "labels_sample": ""
    },
    "contents": {
    "contents_sample": {
    "type": "asset"
    }
    }
    }

    // main.ts
    import { Showpad } from '@showpad/experience-app-sdk'

    interface EnrichedConfigJSON extends Showpad.EnrichedConfigJSON {
    labels: {
    labels_sample: Showpad.Label
    }
    contents: {
    contents_sample: Showpad.ContentAsset
    }
    }

    const enrichedConfigJSON = await Showpad.parseEnrichedConfig<EnrichedConfigJSON>()

    Type Parameters

    Parameters

    Returns Promise<T>

    the standardized config.json from the experience app editor, enriched with the getAssetFileUrl, getAssetPreviewUrl and getAssetThumbnailUrl methods.

Generated using TypeDoc