Sha256: b36631adab56f00696aaf7e4aea6ffaf7a9790de2076e2955c2fcd11c827a759

Contents?: true

Size: 1.79 KB

Versions: 32

Compression:

Stored size: 1.79 KB

Contents

import Migration, { MigrationFunction } from '@watermarkchurch/contentful-migration'

export = function(migration: Migration, { makeRequest, spaceId, accessToken }) {

  const sectionCodeWidget = migration.createContentType('section-code-widget', {
    displayField:
      'internalTitle',
    name:
      'Section: Code Widget',
    description:
      'Render code defined section views from JSON parameters.',
  })

  sectionCodeWidget.createField('internalTitle', {
    name:
      'Internal Title',
    type:
      'Symbol',
    localized:
      false,
    required:
      true,
    validations:
      [],
    disabled:
      false,
    omitted:
      true,
  })

  sectionCodeWidget.createField('view', {
    name:
      'View',
    type:
      'Symbol',
    localized:
      false,
    required:
      true,
    validations:
      [],
    disabled:
      false,
    omitted:
      false,
  })

  sectionCodeWidget.createField('parameters', {
    name:
      'Parameters',
    type:
      'Object',
    localized:
      false,
    required:
      false,
    validations:
      [],
    disabled:
      false,
    omitted:
      false,
  })

  sectionCodeWidget.createField('bookmarkTitle', {
    name:
      'Bookmark Title',
    type:
      'Symbol',
    localized:
      false,
    required:
      false,
    validations:
      [],
    disabled:
      false,
    omitted:
      false,
  })

  sectionCodeWidget.changeEditorInterface('internalTitle', 'singleLine')

  sectionCodeWidget.changeEditorInterface('view', 'dropdown')

  sectionCodeWidget.changeEditorInterface('parameters', 'objectEditor', { helpText: 'These parameters may or may not be required by the code widget.  Inspect the ruby code to see what to put here.' })

  sectionCodeWidget.changeEditorInterface('bookmarkTitle', 'singleLine')

} as MigrationFunction

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
wcc-contentful-app-1.7.1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.7.0 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.6.2 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.6.1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.6.0 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.5.1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.5.0 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.5.0.rc1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.4.0 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.4.0.rc3 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.4.0.rc2 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.3.2 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.4.0.rc1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.3.1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.3.0 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.2.1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.2.0 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.1.2 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.1.1 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts
wcc-contentful-app-1.1.0 lib/generators/wcc/templates/section-code-widget/migrations/generated_add_section-code-widget.ts