Skip to main content
The Draft Package Workflow provides a development environment for testing components, content types, and content before creating formal package versions. This workflow enables teams to iterate on their work while maintaining a clear development-to-production path.

Concepts

The workflow follows these principles:
  1. Development Lifecycle
    • Draft components → Draft package → Draft content type → Draft content
    • Each stage requires the previous to be in place
    • Formal publishing follows the same sequence
    • Dependencies flow downward through the chain
  2. Draft Package
    • Virtual package composed of latest components (both draft and modified)
    • Includes all draft components (never published)
    • Includes all modified components (unpublished changes)
    • Acts as a working copy within the project
    • Not formally versioned or published
    • Used for development and testing
  3. Publishing Constraints
    • Content type cannot be published unless its package is published
    • Content cannot be published unless its content type is published
    • Enforces stability in the production chain
    • Prevents referencing unstable components

Workflow Diagram

Using Draft Package in Content Types

Content types can reference the draft package during development to use the latest component versions without needing to create a formal package.

Create Content Type with Draft Package

Request Body:
When using "packageVersion": "draft", the content type is tied to the current working state of components. This content type cannot be published until an actual package version is created and the content type is updated to reference it.

Creating Content from Draft Content Types

Content can be created from draft content types, but it will also remain in draft state until its content type is published.

Create Content with Draft Content Type

Request Body:

Publishing Workflow

Step 1: Publish Package

First, create and publish a formal package version. This will:
  • Publish all draft components (never published) with version 1
  • Publish all modified components with incremented version
  • Create an immutable package snapshot
Request Body:

Step 2: Update Content Type to Use Published Package

Request Body:

Step 3: Publish Content Type

Step 4: Publish Content

Code Example

Complete workflow from development to production: