Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/dam-app-base

Package Overview
Dependencies
Maintainers
97
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/dam-app-base

[![CircleCI](https://circleci.com/gh/contentful/apps.svg?style=svg&circle-token=913f0d4852062fbed644fca927d059d5e3e72908)](https://circleci.com/gh/contentful/apps)

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
375
increased by30.66%
Maintainers
97
Weekly downloads
 
Created
Source

CircleCI

dam-app-base

@contentful/dam-app-base is a library that helps you to quickly build an app to integrate your DAM (Digital Asset Management) system of choice with Contentful. Many DAM integrations are very similar, therefore this library provides the boilerplate for your app and you only need to add the code for your specific service.

Usage

import { setup } from '@contentful/dam-app-base';

setup({
  cta: 'Select assets',
  name: 'My DAM App',
  logo: 'https://example.com/logo.svg',
  color: '#d7f0fa',
  description: 'My example DAM App',
  parameterDefinitions: [
    {
      "id": "folder",
      "type": "Symbol",
      "name": "Folder",
      "description": "Preselected folder when selecting assets.",
      "required": true
    }
  ],
  validateParameters: () => null,
  makeThumbnail: asset => asset.thumbnailUrl,
  renderDialog: async (sdk) => {
    const config = sdk.parameters.invocation;

    const container = document.createElement('div');
    container.innerHTML = `<iframe src="https://example.com/dam?folder=${config.folder}" />`;
    document.body.appendChild(container);
  },
  openDialog: async (sdk, currentValue, config) => {
    return await sdk.dialogs.openCurrentApp({
      parameters: { config, currentValue },
    });
  },
  isDisabled: () => false
});

Type Documentation

Apps

These Contentful apps use @contentful/dam-app-base. Look at there source code to learn how they utilize this library:

FAQs

Package last updated on 12 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc