Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.86 KB

publishing.md

File metadata and controls

63 lines (41 loc) · 1.86 KB

Publishing

The publishing module provides functionality to work with webhook publishing. The module provides the following methods.

getPublishingEventById experimental-badge

parameters:

  • eventId: string
  • tokenGetParam: any (optional)

returns: Promise<PublishingEvent>

Gets the event with the provided ID.

getPublishingMetadata experimental-badge

parameters:

  • eventId: string
  • tokenGetParam: any (optional)

returns: Promise<{ data: PublishingMetadataForAsset[] }>

Gets the publishing metadata for the event with the provided ID.

addPublishingMetadata experimental-badge

parameters:

  • eventId: string
  • payload: object
  • tokenGetParam: any (optional)

returns: Promise<PublishingMetadataPostResponse>

Adds the publishing metadata for the event with the provided event id. The second parameter payload contains the publishing metadata to be added. The payload object has the following structure,

{
  data: Array<{
    assetId: string,
    status: "published" | "unpublished" | "synced" | "failed",
    statusMessage: string, // optional
    locale: string, // optional
    publicUrl: string, // optional
    publishingDestinationUpdatedAt: string, // optional
  }>
}

getPublishingMetadataForAsset experimental-badge

parameters:

  • eventId: string
  • assetId: string
  • metadataId: string
  • tokenGetParam: any (optional)

returns: Promise<PublishingMetadataForAsset>

Gets the publishing metadata of an asset for the event with the provided event ID.