• Enriches assets with the getAssetFileUrl and getAssetPreviewUrl method.

    Example

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

    const assets = [{
    "id": "a3e72bbfae0b87381106b1beb685ea88",
    "slug": "648b2eb8-6fa1-40f2-b787-39cb1d51db69",
    "applink": "showpad://file/648b2eb8-6fa1-40f2-b787-39cb1d51db69",
    "name": "sample.pdf",
    "displayName": "sample",
    "type": "document",
    "description": "",
    "permissions": {
    "share": true,
    "download": true,
    "annotate": true
    },
    "tagIds": [
    "5debee5405cfd4e2797b553037ceb78c"
    ],
    "createdAt": "1970-01-19T21:15:07.909Z",
    "updatedAt": "1970-01-19T23:24:34.801Z",
    "expiresAt": null
    }]

    const enrichedAssets = await Showpad.enrichAssets(assets, 400)

    Parameters

    • assets: Asset[]
    • size: number = 1600

      The maximum dimension for the width or height of the preview.

    Returns Promise<EnrichedAsset[]>

Generated using TypeDoc