The object returned by the Releases API

interface Release {
    entities: BaseCollection<Link<Entity>>;
    metadata?: ReleaseMetadata;
    sys: ReleaseSysProps;
    title: string;
    archive(): Promise<Release>;
    delete(): Promise<void>;
    publish(options?: AsyncActionProcessingOptions): Promise<ReleaseAction<"publish">>;
    toPlainObject(): ReleaseProps;
    unarchive(): Promise<Release>;
    unpublish(options?: AsyncActionProcessingOptions): Promise<ReleaseAction<"unpublish">>;
    update(payload: ReleasePayload): Promise<Release>;
    validate(__namedParameters?: {
        options?: AsyncActionProcessingOptions;
        payload?: ReleaseValidatePayload;
    }): Promise<ReleaseAction<"validate">>;
}

Hierarchy (view full)

Properties

entities: BaseCollection<Link<Entity>>
metadata?: ReleaseMetadata
title: string

Methods

  • Archives a release and locks any actions such as adding new entities or publishing/unpublishing. This operation increases the sys.version property

    Returns Promise<Release>

    if the release is already archived

  • Deletes a Release and all ReleaseActions linked to it (non-reversible)

    Returns Promise<void>

  • Publishes a Release and waits until the asynchronous action is completed

    Parameters

    • Optionaloptions: AsyncActionProcessingOptions

    Returns Promise<ReleaseAction<"publish">>

  • Unarchives an archived release and unlocks operations on the Release. This operation increases the sys.version property

    Returns Promise<Release>

    if the release is not archived

  • Unpublishes a Release and waits until the asynchronous action is completed

    Parameters

    • Optionaloptions: AsyncActionProcessingOptions

    Returns Promise<ReleaseAction<"unpublish">>

  • Validates a Release and waits until the asynchronous action is completed

    Parameters

    • Optional__namedParameters: {
          options?: AsyncActionProcessingOptions;
          payload?: ReleaseValidatePayload;
      }
      • Optionaloptions?: AsyncActionProcessingOptions
      • Optionalpayload?: ReleaseValidatePayload

    Returns Promise<ReleaseAction<"validate">>