Options
All
  • Public
  • Public/Protected
  • All
Menu

contentful-management.js - v10.6.2

Contentful Management API SDK. Allows you to create instances of a client with access to the Contentful Content Management API.

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Functions

Type aliases

AlphaPlainClientAPI

AlphaPlainClientAPI: PlainClientAPI & AlphaWorkflowExtension

ApiKeyProps

ApiKeyProps: { accessToken: string; description?: string; environments: { sys: MetaLinkProps }[]; name: string; policies?: { action: string; effect: string }[]; preview_api_key: { sys: MetaLinkProps }; sys: MetaSysProps }

Type declaration

AppAction

AppAction: AppActionProps & DefaultElements<AppActionProps> & { delete: any }

AppActionCallProps

AppActionCallProps: { sys: AppActionCallSys }

Type declaration

  • sys: AppActionCallSys

    System metadata

AppActionCategoryProps

AppActionCategoryProps: { description: string; name: string; parameters?: AppActionParameterDefinition[]; sys: { id: AppActionCategoryType; type: "AppActionCategory"; version: string } }

Type declaration

AppActionParameterDefinition

AppActionParameterDefinition: Omit<ParameterDefinition, "labels">

AppActionProps

AppActionProps: AppActionCategory & { name: string; sys: AppActionSys; url: string }

AppBundleFile

AppBundleFile: { md5: string; name: string; size: number }

Type declaration

  • md5: string
  • name: string
  • size: number

AppBundleProps

AppBundleProps: { comment?: string; files: AppBundleFile[]; sys: AppBundleSys }

Type declaration

  • Optional comment?: string

    A comment that describes this bundle

  • files: AppBundleFile[]

    List of all the files that are in this bundle

  • sys: AppBundleSys

    System metadata

AppDefinition

AppDefinition: ContentfulAppDefinitionAPI & AppDefinitionProps & DefaultElements<AppDefinitionProps>

AppDefinitionProps

AppDefinitionProps: { bundle?: Link<"AppBundle">; locations?: AppLocation[]; name: string; parameters?: { instance?: ParameterDefinition[] }; src?: string; sys: BasicMetaSysProps & { organization: SysLink; shared: boolean } }

Type declaration

  • Optional bundle?: Link<"AppBundle">

    Link to an AppBundle

  • Optional locations?: AppLocation[]

    Locations where the app can be installed

  • name: string

    App name

  • Optional parameters?: { instance?: ParameterDefinition[] }

    Instance parameter definitions

  • Optional src?: string

    URL where the root HTML document of the app can be found

  • sys: BasicMetaSysProps & { organization: SysLink; shared: boolean }

    System metadata

AppDetailsProps

AppDetailsProps: { icon?: AppIcon; sys: AppDetailsSys }

Type declaration

  • Optional icon?: AppIcon

    An Icon that represents the App

  • sys: AppDetailsSys

    System metadata

AppInstallationProps

AppInstallationProps: { parameters?: FreeFormParameters; sys: BasicMetaSysProps & { appDefinition: SysLink; environment: SysLink; space: SysLink } }

Type declaration

AppLocation

AppSignedRequestProps

AppSignedRequestProps: { additionalHeaders: { x-contentful-environment-id: string; x-contentful-signature: string; x-contentful-signed-headers: string; x-contentful-space-id: string; x-contentful-timestamp: string; x-contentful-user-id: string }; sys: AppSignedRequestSys }

Type declaration

  • additionalHeaders: { x-contentful-environment-id: string; x-contentful-signature: string; x-contentful-signed-headers: string; x-contentful-space-id: string; x-contentful-timestamp: string; x-contentful-user-id: string }

    new headers to be included in the request

    • x-contentful-environment-id: string
    • x-contentful-signature: string
    • x-contentful-signed-headers: string
    • x-contentful-space-id: string
    • x-contentful-timestamp: string
    • x-contentful-user-id: string
  • sys: AppSignedRequestSys

    System metadata

AppSigningSecretProps

AppSigningSecretProps: { redactedValue: string; sys: AppSigningSecretSys }

Type declaration

  • redactedValue: string

    The last four characters of the signing secret

  • sys: AppSigningSecretSys

    System metadata

AppUploadProps

AppUploadProps: { sys: AppUploadSys & { expiresAt: string; organization: SysLink } }

Type declaration

  • sys: AppUploadSys & { expiresAt: string; organization: SysLink }

AssetKeyProps

AssetKeyProps: { policy: string; secret: string }

Type declaration

  • policy: string

    A JWT describing a policy; needs to be attached to signed URLs

  • secret: string

    A secret key to be used for signing URLs

AssetProps

AssetProps: { fields: { description?: {}; file: {}; title: {} }; metadata?: MetadataProps; sys: EntityMetaSysProps }

Type declaration

  • fields: { description?: {}; file: {}; title: {} }
    • Optional description?: {}

      Description for this asset

      • [key: string]: string
    • file: {}

      File object for this asset

      • [key: string]: { contentType: string; details?: Record<string, any>; fileName: string; upload?: string; uploadFrom?: Record<string, any>; url?: string }
        • contentType: string
        • Optional details?: Record<string, any>

          Details for the file, depending on file type (example: image size in bytes, etc)

        • fileName: string
        • Optional upload?: string

          Url where the file is available to be downloaded from, into the Contentful asset system. After the asset is processed this field is gone.

        • Optional uploadFrom?: Record<string, any>
        • Optional url?: string

          Url where the file is available at the Contentful media asset system. This field won't be available until the asset is processed.

    • title: {}

      Title for this asset

      • [key: string]: string
  • Optional metadata?: MetadataProps
  • sys: EntityMetaSysProps

BulkActionPayload

BulkActionType

BulkActionType: "publish" | "unpublish" | "validate"

ClientAPI

ClientAPI: ReturnType<typeof createClientApi>

ClientParams

ClientParams: RestAdapterParams & UserAgentParams
deprecated

CommentProps

CommentProps: { body: string; sys: CommentSysProps }

Type declaration

  • body: string
  • sys: CommentSysProps

ContentTypeMetadata

ContentTypeMetadata: { annotations?: RequireAtLeastOne<{ ContentType?: Link<"Annotation">[]; ContentTypeField?: Record<string, Link<"Annotation">[]> }, "ContentType" | "ContentTypeField"> }

Type declaration

  • Optional annotations?: RequireAtLeastOne<{ ContentType?: Link<"Annotation">[]; ContentTypeField?: Record<string, Link<"Annotation">[]> }, "ContentType" | "ContentTypeField">

ContentTypeProps

ContentTypeProps: { description: string; displayField: string; fields: ContentFields[]; metadata?: ContentTypeMetadata; name: string; sys: BasicMetaSysProps & { environment: SysLink; firstPublishedAt?: string; publishedCounter?: number; publishedVersion?: number; space: SysLink } }

Type declaration

  • description: string
  • displayField: string

    Field used as the main display field for Entries

  • fields: ContentFields[]

    All the fields contained in this Content Type

  • Optional metadata?: ContentTypeMetadata
  • name: string
  • sys: BasicMetaSysProps & { environment: SysLink; firstPublishedAt?: string; publishedCounter?: number; publishedVersion?: number; space: SysLink }

CreateApiKeyProps

CreateApiKeyProps: Pick<ApiKeyProps, "name" | "environments" | "description">

CreateAppActionCallProps

CreateAppActionCallProps: { parameters: {} }

Type declaration

  • parameters: {}

    The body for the call

    • [key: string]: any

CreateAppActionProps

CreateAppActionProps: AppActionCategory & { name: string; url: string }

CreateAppBundleProps

CreateAppBundleProps: { appUploadId: string; comment?: string }

Type declaration

  • appUploadId: string
  • Optional comment?: string

CreateAppDefinitionProps

CreateAppDefinitionProps: SetOptional<Except<AppDefinitionProps, "sys" | "bundle">, "src" | "locations">

CreateAppDetailsProps

CreateAppDetailsProps: { icon?: AppIcon }

Type declaration

  • Optional icon?: AppIcon

    An Icon that represents the App

CreateAppInstallationProps

CreateAppInstallationProps: Except<AppInstallationProps, "sys">

CreateAppSignedRequestProps

CreateAppSignedRequestProps: { body?: string; headers?: Record<string, string>; method: "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD"; path: string }

Type declaration

  • Optional body?: string

    optional stringified body of the request

  • Optional headers?: Record<string, string>

    optional headers of the request

  • method: "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD"

    the request method

  • path: string

    the path of the request method

CreateAppSigningSecretProps

CreateAppSigningSecretProps: { value: string }

Type declaration

  • value: string

    A 64 character matching the regular expression /^[0-9a-zA-Z+/=_-]+$/

CreateAssetKeyProps

CreateAssetKeyProps: { expiresAt: number }

Type declaration

  • expiresAt: number

    (required) UNIX timestamp in the future (but not more than 48 hours from now)

CreateAssetProps

CreateAssetProps: Omit<AssetProps, "sys">

CreateCommentProps

CreateCommentProps: Omit<CommentProps, "sys">

CreateContentTypeProps

CreateContentTypeProps: SetOptional<Except<ContentTypeProps, "sys">, "description" | "displayField">

CreateEntryProps

CreateEntryProps<TFields>: Omit<EntryProps<TFields>, "sys">

Type parameters

CreateEnvironmentAliasProps

CreateEnvironmentAliasProps: Omit<EnvironmentAliasProps, "sys">

CreateEnvironmentProps

CreateEnvironmentProps: Partial<Omit<EnvironmentProps, "sys">>

CreateLocaleProps

CreateLocaleProps: Omit<SetOptional<Except<LocaleProps, "sys">, "optional" | "contentManagementApi" | "default" | "contentDeliveryApi">, "internal_code">

CreateOrganizationInvitationProps

CreateOrganizationInvitationProps: Omit<OrganizationInvitationProps, "sys">

CreatePersonalAccessTokenProps

CreatePersonalAccessTokenProps: Pick<PersonalAccessToken, "name" | "scopes">

CreateRoleProps

CreateRoleProps: Omit<RoleProps, "sys">

CreateSpaceMembershipProps

CreateSpaceMembershipProps: Omit<SpaceMembershipProps, "sys" | "user"> & { email: string }

CreateTagProps

CreateTagProps: Omit<TagProps, "sys"> & { sys: Pick<TagSysProps, "visibility"> }

CreateTaskProps

CreateTaskProps: Omit<TaskProps, "sys">

CreateTeamMembershipProps

CreateTeamMembershipProps: Omit<TeamMembershipProps, "sys">

CreateTeamProps

CreateTeamProps: Omit<TeamProps, "sys">

CreateTeamSpaceMembershipProps

CreateTeamSpaceMembershipProps: Omit<TeamSpaceMembershipProps, "sys">

CreateUIExtensionProps

CreateUIExtensionProps: { extension: RequireExactlyOne<SetRequired<UIExtensionProps["extension"], "name" | "fieldTypes" | "sidebar">, "src" | "srcdoc"> }

Type declaration

  • extension: RequireExactlyOne<SetRequired<UIExtensionProps["extension"], "name" | "fieldTypes" | "sidebar">, "src" | "srcdoc">

CreateWebhooksProps

CreateWebhooksProps: SetOptional<Except<WebhookProps, "sys">, "headers" | "active">

CreateWorkflowDefinitionProps

CreateWorkflowDefinitionProps: Omit<WorkflowDefinitionProps, "sys" | "steps"> & { steps: CreateWorkflowStepProps[] }

CreateWorkflowProps

CreateWorkflowProps: Omit<WorkflowProps, "sys"> & { entity: Link<"Entry">; workflowDefinition: Link<"WorkflowDefinition"> }

DefinedParameters

DefinedParameters: Record<string, string | number | boolean>

EditorInterfaceProps

EditorInterfaceProps: { controls?: Control[]; editor?: Editor; editorLayout?: FieldGroupItem[]; editors?: Editor[]; groupControls?: GroupControl[]; sidebar?: SidebarItem[]; sys: MetaSysProps & { contentType: { sys: MetaLinkProps }; environment: { sys: MetaLinkProps }; space: { sys: MetaLinkProps } } }

Type declaration

  • Optional controls?: Control[]

    Array of fields and their associated widgetId

  • Optional editor?: Editor

    Legacy singular editor override

  • Optional editorLayout?: FieldGroupItem[]

    Array of editor layout field groups

  • Optional editors?: Editor[]

    Array of editors. Defaults will be used if property is missing.

  • Optional groupControls?: GroupControl[]

    Array of field groups and their associated widgetId

  • Optional sidebar?: SidebarItem[]

    Array of sidebar widgets. Defaults will be used if property is missing.

  • sys: MetaSysProps & { contentType: { sys: MetaLinkProps }; environment: { sys: MetaLinkProps }; space: { sys: MetaLinkProps } }

EditorLayoutItem

EditorLayoutItem: FieldItem | FieldGroupItem

EntryProps

EntryProps<T>: { fields: T; metadata?: MetadataProps; sys: EntityMetaSysProps }

Type parameters

Type declaration

Environment

Environment: ContentfulEnvironmentAPI & EnvironmentProps & DefaultElements<EnvironmentProps>

EnvironmentAliasProps

EnvironmentAliasProps: { environment: { sys: MetaLinkProps }; sys: BasicMetaSysProps & { space: SysLink } }

Type declaration

EnvironmentProps

EnvironmentProps: { name: string; sys: EnvironmentMetaSys }

Type declaration

  • name: string

    Name of the environment

  • sys: EnvironmentMetaSys

    System metadata

FieldType

FieldType: { type: "Symbol" } | { type: "Text" } | { type: "RichText" } | { type: "Integer" } | { type: "Number" } | { type: "Date" } | { type: "Boolean" } | { type: "Object" } | { type: "Location" } | { linkType: "Asset"; type: "Link" } | { linkType: "Entry"; type: "Link" } | { items: { type: "Symbol" }; type: "Array" } | { items: { linkType: "Entry"; type: "Link" }; type: "Array" } | { items: { linkType: "Asset"; type: "Link" }; type: "Array" }

FreeFormParameters

FreeFormParameters: Record<string, any> | any[] | number | string | boolean

GetAppActionCallParams

GetAppActionCallParams: GetAppInstallationParams & { appActionId: string }

GetAppActionParams

GetAppActionParams: GetAppDefinitionParams & { appActionId: string }

GetAppActionsForEnvParams

GetAppActionsForEnvParams: GetSpaceParams & { environmentId?: string }

GetAppBundleParams

GetAppBundleParams: GetAppDefinitionParams & { appBundleId: string }

GetAppDefinitionParams

GetAppDefinitionParams: GetOrganizationParams & { appDefinitionId: string }

GetAppInstallationParams

GetAppInstallationParams: GetSpaceEnvironmentParams & { appDefinitionId: string }

GetAppInstallationsForOrgParams

GetAppInstallationsForOrgParams: GetOrganizationParams & { appDefinitionId: string }

GetAppUploadParams

GetAppUploadParams: GetOrganizationParams & { appUploadId: string }

GetBulkActionParams

GetBulkActionParams: GetSpaceEnvironmentParams & { bulkActionId: string }

GetCommentParams

GetCommentParams: GetEntryParams & { commentId: string }

GetContentTypeParams

GetContentTypeParams: GetSpaceEnvironmentParams & { contentTypeId: string }

GetEditorInterfaceParams

GetEditorInterfaceParams: GetSpaceEnvironmentParams & { contentTypeId: string }

GetEntryParams

GetEntryParams: GetSpaceEnvironmentParams & { entryId: string }

GetExtensionParams

GetExtensionParams: GetSpaceEnvironmentParams & { extensionId: string }

GetOrganizationMembershipProps

GetOrganizationMembershipProps: GetOrganizationParams & { organizationMembershipId: string }

GetOrganizationParams

GetOrganizationParams: { organizationId: string }

Type declaration

  • organizationId: string

GetReleaseParams

GetReleaseParams: GetSpaceEnvironmentParams & { releaseId: string }

GetSnapshotForContentTypeParams

GetSnapshotForContentTypeParams: GetSpaceEnvironmentParams & { contentTypeId: string }

GetSnapshotForEntryParams

GetSnapshotForEntryParams: GetSpaceEnvironmentParams & { entryId: string }

GetSpaceEnvAliasParams

GetSpaceEnvAliasParams: GetSpaceParams & { environmentAliasId: string }

GetSpaceEnvironmentParams

GetSpaceEnvironmentParams: { environmentId: string; spaceId: string }

Type declaration

  • environmentId: string
  • spaceId: string

GetSpaceMembershipProps

GetSpaceMembershipProps: GetSpaceParams & { spaceMembershipId: string }

GetSpaceParams

GetSpaceParams: { spaceId: string }

Type declaration

  • spaceId: string

GetTagParams

GetTagParams: GetSpaceEnvironmentParams & { tagId: string }

GetTaskParams

GetTaskParams: GetEntryParams & { taskId: string }

GetTeamMembershipParams

GetTeamMembershipParams: GetTeamParams & { teamMembershipId: string }

GetTeamParams

GetTeamParams: { organizationId: string; teamId: string }

Type declaration

  • organizationId: string
  • teamId: string

GetTeamSpaceMembershipParams

GetTeamSpaceMembershipParams: GetSpaceParams & { teamSpaceMembershipId: string }

GetWebhookCallDetailsUrl

GetWebhookCallDetailsUrl: GetWebhookParams & { callId: string }

GetWebhookParams

GetWebhookParams: GetSpaceParams & { webhookDefinitionId: string }

GetWorkflowDefinitionParams

GetWorkflowDefinitionParams: GetSpaceEnvironmentParams & { workflowDefinitionId: string }

GetWorkflowParams

GetWorkflowParams: GetSpaceEnvironmentParams & { workflowId: string }

ISO8601Timestamp

ISO8601Timestamp: string

String will be in ISO8601 datetime format e.g. 2013-06-26T13:57:24Z

KeyValueMap

KeyValueMap: Record<string, any>

LocaleProps

LocaleProps: { code: string; contentDeliveryApi: boolean; contentManagementApi: boolean; default: boolean; fallbackCode: string | null; internal_code: string; name: string; optional: boolean; sys: BasicMetaSysProps & { environment: SysLink; space: SysLink } }

Type declaration

  • code: string

    Locale code (example: en-us)

  • contentDeliveryApi: boolean

    If the content under this locale should be available on the CDA (for public reading)

  • contentManagementApi: boolean

    If the content under this locale should be available on the CMA (for editing)

  • default: boolean

    If this is the default locale

  • fallbackCode: string | null

    Locale code to fallback to when there is not content for the current locale

  • internal_code: string

    Internal locale code

  • name: string

    Locale name

  • optional: boolean

    If the locale needs to be filled in on entries or not

  • sys: BasicMetaSysProps & { environment: SysLink; space: SysLink }

Organization

Organization: DefaultElements<OrganizationProp> & OrganizationProp & ContentfulOrganizationAPI

OrganizationInvitationProps

OrganizationInvitationProps: { email: string; firstName: string; lastName: string; role: string; sys: MetaSysProps & { invitationUrl: string; organizationMembership: { sys: MetaLinkProps }; status: string; user: Record<string, any> | null } }

Type declaration

  • email: string
  • firstName: string
  • lastName: string
  • role: string
  • sys: MetaSysProps & { invitationUrl: string; organizationMembership: { sys: MetaLinkProps }; status: string; user: Record<string, any> | null }

OrganizationMembershipProps

OrganizationMembershipProps: { role: string; status: boolean; sys: MetaSysProps & { user: { sys: MetaLinkProps } } }

Type declaration

OrganizationProp

OrganizationProp: { name: string; sys: MetaSysProps }

Type declaration

PaginationQueryParams

PaginationQueryParams: { query?: PaginationQueryOptions }

Type declaration

PersonalAccessTokenProp

PersonalAccessTokenProp: { name: string; revokedAt: null | string; scopes: "content_management_manage"[]; sys: MetaSysProps; token?: string }

Type declaration

  • name: string
  • revokedAt: null | string
  • scopes: "content_management_manage"[]
  • sys: MetaSysProps
  • Optional token?: string

PlainClientAPI

PlainClientAPI: { apiKey: { create: any; createWithId: any; delete: any; get: any; getMany: any; update: any }; appAction: { create: any; delete: any; get: any; getMany: any; getManyForEnvironment: any; update: any }; appActionCall: { create: any }; appBundle: { create: any; delete: any; get: any; getMany: any }; appDefinition: { create: any; delete: any; get: any; getInstallationsForOrg: any; getMany: any; update: any }; appDetails: { delete: any; get: any; upsert: any }; appInstallation: { delete: any; get: any; getMany: any; upsert: any }; appSignedRequest: { create: any }; appSigningSecret: { delete: any; get: any; upsert: any }; appUpload: { create: any; delete: any; get: any }; asset: { archive: any; create: any; createFromFiles: any; createWithId: any; delete: any; get: any; getMany: any; processForAllLocales: any; processForLocale: any; publish: any; unarchive: any; unpublish: any; update: any }; assetKey: { create: any }; bulkAction: { get: any; publish: any; unpublish: any; validate: any }; comment: { create: any; delete: any; get: any; getMany: any; update: any }; contentType: { create: any; createWithId: any; delete: any; get: any; getMany: any; omitAndDeleteField: any; publish: any; unpublish: any; update: any }; editorInterface: { get: any; getMany: any; update: any }; entry: { archive: any; create: any; createWithId: any; delete: any; get: any; getMany: any; patch: any; publish: any; references: any; unarchive: any; unpublish: any; update: any }; environment: { create: any; createWithId: any; delete: any; get: any; getMany: any; update: any }; environmentAlias: { createWithId: any; delete: any; get: any; getMany: any; update: any }; extension: { create: any; createWithId: any; delete: any; get: any; getMany: any; update: any }; locale: { create: any; delete: any; get: any; getMany: any; update: any }; organization: { get: any; getAll: any }; organizationInvitation: { create: any; get: any }; organizationMembership: { delete: any; get: any; getMany: any; update: any }; personalAccessToken: { create: any; get: any; getMany: any; revoke: any }; previewApiKey: { get: any; getMany: any }; raw: { delete: any; get: any; getDefaultParams: any; http: any; patch: any; post: any; put: any }; release: { archive: any; create: any; delete: any; get: any; publish: any; query: any; unarchive: any; unpublish: any; update: any; validate: any }; releaseAction: { get: any; getMany: any; queryForRelease: any }; role: { create: any; createWithId: any; delete: any; get: any; getMany: any; update: any }; scheduledActions: { create: any; delete: any; get: any; getMany: any; update: any }; snapshot: { getForContentType: any; getForEntry: any; getManyForContentType: any; getManyForEntry: any }; space: { create: any; delete: any; get: any; getMany: any; update: any }; spaceMember: { get: any; getMany: any }; spaceMembership: { create: any; createWithId: any; delete: any; get: any; getForOrganization: any; getMany: any; getManyForOrganization: any; update: any }; tag: { createWithId: any; delete: any; get: any; getMany: any; update: any }; task: { create: any; delete: any; get: any; getMany: any; update: any }; team: { create: any; delete: any; get: any; getMany: any; getManyForSpace: any; update: any }; teamMembership: { create: any; delete: any; get: any; getManyForOrganization: any; getManyForTeam: any; update: any }; teamSpaceMembership: { create: any; delete: any; get: any; getForOrganization: any; getMany: any; getManyForOrganization: any; update: any }; upload: { create: any; delete: any; get: any }; usage: { getManyForOrganization: any; getManyForSpace: any }; user: { getCurrent: any; getForOrganization: any; getForSpace: any; getManyForOrganization: any; getManyForSpace: any }; webhook: { create: any; delete: any; get: any; getCallDetails: any; getHealthStatus: any; getMany: any; getManyCallDetails: any; update: any } }

Type declaration

PlainClientDefaultParams

PlainClientDefaultParams: DefaultParams

PreviewApiKeyProps

PreviewApiKeyProps: { accessToken: string; description: string; name: string; sys: MetaSysProps }

Type declaration

  • accessToken: string
  • description: string
  • name: string
  • sys: MetaSysProps

QueryParams

QueryParams: { query?: QueryOptions }

Type declaration

ReleaseActionSysProps

ReleaseActionSysProps: { createdAt: ISO8601Timestamp; createdBy: Link<"User">; environment: Link<"Environment">; id: string; release: Link<"Release">; space: Link<"Space">; status: ReleaseActionStatuses; type: "ReleaseAction"; updatedAt: ISO8601Timestamp }

Type declaration

ReleaseActionTypes

ReleaseActionTypes: "publish" | "unpublish" | "validate"

ReleaseSysProps

ReleaseSysProps: { archivedAt?: ISO8601Timestamp; archivedBy?: Link<"User">; createdAt: ISO8601Timestamp; createdBy: Link<"User"> | Link<"AppDefinition">; environment: Link<"Environment">; id: string; lastAction?: Link<"ReleaseAction">; space: Link<"Space">; status: ReleaseStatus; type: "Release"; updatedAt: ISO8601Timestamp; updatedBy: Link<"User"> | Link<"AppDefinition">; version: number }

Type declaration

RoleProps

RoleProps: { description?: string; name: string; permissions: { ContentDelivery: string[] | string; ContentModel: string[]; EnvironmentAliases: string[] | string; Environments: string[] | string; Settings: string[] | string; Tags: string[] | string }; policies: { actions: ActionType[] | "all"; constraint: ConstraintType; effect: string }[]; sys: BasicMetaSysProps & { space: SysLink } }

Type declaration

  • Optional description?: string
  • name: string
  • permissions: { ContentDelivery: string[] | string; ContentModel: string[]; EnvironmentAliases: string[] | string; Environments: string[] | string; Settings: string[] | string; Tags: string[] | string }

    Permissions for application sections

    • ContentDelivery: string[] | string
    • ContentModel: string[]
    • EnvironmentAliases: string[] | string
    • Environments: string[] | string
    • Settings: string[] | string
    • Tags: string[] | string
  • policies: { actions: ActionType[] | "all"; constraint: ConstraintType; effect: string }[]
  • sys: BasicMetaSysProps & { space: SysLink }

ScheduledActionProps

ScheduledActionProps: { action: SchedulableActionType; entity: Link<SchedulableEntityType>; environment?: { sys: MetaLinkProps }; error?: ScheduledActionFailedError; scheduledFor: { datetime: ISO8601Timestamp; timezone?: string }; sys: ScheduledActionSysProps }

Type declaration

ScheduledActionSysProps

ScheduledActionSysProps: { canceledAt?: ISO8601Timestamp; canceledBy?: Link<"User"> | Link<"AppDefinition">; createdAt: ISO8601Timestamp; createdBy: Link<"User"> | Link<"AppDefinition">; id: string; space: SysLink; status: ScheduledActionStatus; type: "ScheduledAction"; updatedAt: ISO8601Timestamp; updatedBy: Link<"User"> | Link<"AppDefinition">; version: number }

Type declaration

  • Optional canceledAt?: ISO8601Timestamp

    an ISO8601 date string representing when an action was moved to canceled

  • Optional canceledBy?: Link<"User"> | Link<"AppDefinition">
  • createdAt: ISO8601Timestamp
  • createdBy: Link<"User"> | Link<"AppDefinition">
  • id: string
  • space: SysLink
  • status: ScheduledActionStatus
  • type: "ScheduledAction"
  • updatedAt: ISO8601Timestamp

    an ISO8601 date string representing when an action was updated

  • updatedBy: Link<"User"> | Link<"AppDefinition">
  • version: number

SnapshotProps

SnapshotProps<T>: { snapshot: T; sys: MetaSysProps & { snapshotEntityType: string; snapshotType: string } }

Type parameters

  • T

Type declaration

  • snapshot: T
  • sys: MetaSysProps & { snapshotEntityType: string; snapshotType: string }

Space

Space: SpaceProps & DefaultElements<SpaceProps> & ContentfulSpaceAPI

SpaceMemberProps

SpaceMemberProps: { admin: boolean; roles: { sys: MetaLinkProps }[]; sys: MetaSysProps }

Type declaration

SpaceMembershipProps

SpaceMembershipProps: { admin: boolean; roles: SysLink[]; sys: MetaSysProps & { space: SysLink; user: SysLink }; user: SysLink }

Type declaration

SpaceProps

SpaceProps: { name: string; sys: BasicMetaSysProps & { organization: { sys: { id: string } } } }

Type declaration

TagProps

TagProps: { name: string; sys: TagSysProps }

Type declaration

  • name: string
  • sys: TagSysProps

TagVisibility

TagVisibility: "private" | "public"

TaskProps

TaskProps: { assignedTo: Link<"User" | "Team">; body: string; dueDate?: string; status: TaskStatus; sys: TaskSysProps }

Type declaration

  • assignedTo: Link<"User" | "Team">
  • body: string
  • Optional dueDate?: string
  • status: TaskStatus
  • sys: TaskSysProps

TeamMembershipProps

TeamMembershipProps: { admin: boolean; organizationMembershipId: string; sys: MetaSysProps & { organization: { sys: MetaLinkProps }; organizationMembership: { sys: MetaLinkProps }; team: { sys: MetaLinkProps } } }

Type declaration

TeamProps

TeamProps: { description: string; name: string; sys: MetaSysProps & { memberCount: number; organization: { sys: MetaLinkProps } } }

Type declaration

  • description: string

    Description of the team

  • name: string

    Name of the team

  • sys: MetaSysProps & { memberCount: number; organization: { sys: MetaLinkProps } }

    System metadata

TeamSpaceMembershipProps

TeamSpaceMembershipProps: { admin: boolean; roles: { sys: MetaLinkProps }[]; sys: MetaSysProps & { space: { sys: MetaLinkProps }; team: { sys: MetaLinkProps } } }

Type declaration

UIExtensionProps

UIExtensionProps: { extension: { fieldTypes: FieldType[]; name: string; parameters?: { installation?: ParameterDefinition[]; instance?: ParameterDefinition[] }; sidebar?: boolean; src?: string; srcdoc?: string }; parameters?: DefinedParameters; sys: ExtensionSysProps }

Type declaration

  • extension: { fieldTypes: FieldType[]; name: string; parameters?: { installation?: ParameterDefinition[]; instance?: ParameterDefinition[] }; sidebar?: boolean; src?: string; srcdoc?: string }
    • fieldTypes: FieldType[]

      Field types where an extension can be used

    • name: string

      Extension name

    • Optional parameters?: { installation?: ParameterDefinition[]; instance?: ParameterDefinition[] }

      Parameter definitions

    • Optional sidebar?: boolean

      Controls the location of the extension. If true it will be rendered on the sidebar instead of replacing the field's editing control

    • Optional src?: string

      URL where the root HTML document of the extension can be found

    • Optional srcdoc?: string

      String representation of the extension (e.g. inline HTML code)

  • Optional parameters?: DefinedParameters

    Values for installation parameters

  • sys: ExtensionSysProps

UpdateCommentProps

UpdateCommentProps: Omit<CommentProps, "sys"> & { sys: Pick<CommentSysProps, "version"> }

UpdateTaskProps

UpdateTaskProps: Omit<TaskProps, "sys"> & { sys: Pick<TaskSysProps, "version"> }

UpdateWebhookProps

UpdateWebhookProps: SetOptional<Except<WebhookProps, "sys">, "headers" | "name" | "topics" | "url" | "active">

UpdateWorkflowDefinitionProps

UpdateWorkflowDefinitionProps: Omit<WorkflowDefinitionProps, "sys" | "steps"> & { steps: (CreateWorkflowStepProps | UpdateWorkflowStepProps)[]; sys: Pick<WorkflowDefinitionSysProps, "version"> }

UpdateWorkflowProps

UpdateWorkflowProps: Omit<WorkflowProps, "sys"> & { sys: Pick<WorkflowSysProps, "version"> }

UploadProps

UploadProps: { sys: MetaSysProps & { space: SysLink } }

Type declaration

UsageProps

UsageProps: { dateRange: { endAt: string; startAt: string }; metric: UsageMetricEnum; sys: MetaSysProps & { organization?: { sys: MetaLinkProps } }; unitOfMeasure: string; usage: number; usagePerDay: {} }

Type declaration

  • dateRange: { endAt: string; startAt: string }

    Range of usage

    • endAt: string
    • startAt: string
  • metric: UsageMetricEnum

    Type of usage

  • sys: MetaSysProps & { organization?: { sys: MetaLinkProps } }

    System metadata

  • unitOfMeasure: string

    Unit of usage metric

  • usage: number

    Value of the usage

  • usagePerDay: {}

    Usage per day

    • [key: string]: number

UserProps

UserProps: { 2faEnabled: boolean; activated: boolean; avatarUrl: string; confirmed: boolean; cookieConsentData: string; email: string; firstName: string; lastName: string; signInCount: number; sys: BasicMetaSysProps }

Type declaration

  • 2faEnabled: boolean
  • activated: boolean

    Activation flag

  • avatarUrl: string

    Url to the users avatar

  • confirmed: boolean

    User confirmation flag

  • cookieConsentData: string
  • email: string

    Email address of the user

  • firstName: string

    First name of the user

  • lastName: string

    Last name of the user

  • signInCount: number

    Number of sign ins

  • sys: BasicMetaSysProps

    System metadata

WebhookCallRequest

WebhookCallRequest: { body: string; headers: {}; method: string; url: string }

Type declaration

  • body: string
  • headers: {}
    • [key: string]: string
  • method: string
  • url: string

WebhookFilter

WebhookFilter: EqualityConstraint | InConstraint | RegexpConstraint | NotConstraint

WebhookProps

WebhookProps: { active: boolean; filters?: WebhookFilter[]; headers: WebhookHeader[]; httpBasicPassword?: string; httpBasicUsername?: string; name: string; sys: BasicMetaSysProps & { space: SysLink }; topics: string[]; transformation?: WebhookTransformation; url: string }

Type declaration

  • active: boolean

    Whether the Webhook is active. If set to false, no calls will be made

  • Optional filters?: WebhookFilter[]

    Webhook filters

  • headers: WebhookHeader[]

    Headers that should be appended to the webhook request

  • Optional httpBasicPassword?: string

    Password for basic http auth

  • Optional httpBasicUsername?: string

    Username for basic http auth

  • name: string

    Webhook name

  • sys: BasicMetaSysProps & { space: SysLink }

    System metadata

  • topics: string[]

    Topics the webhook wants to subscribe to

  • Optional transformation?: WebhookTransformation

    Transformation to apply

  • url: string

    Webhook url

WebhookTransformation

WebhookTransformation: { body?: JsonValue; contentType?: null | "application/vnd.contentful.management.v1+json" | "application/vnd.contentful.management.v1+json; charset=utf-8" | "application/json" | "application/json; charset=utf-8" | "application/x-www-form-urlencoded" | "application/x-www-form-urlencoded; charset=utf-8"; includeContentLength?: boolean | null; method?: null | "POST" | "GET" | "PUT" | "PATCH" | "DELETE" }

Type declaration

  • Optional body?: JsonValue
  • Optional contentType?: null | "application/vnd.contentful.management.v1+json" | "application/vnd.contentful.management.v1+json; charset=utf-8" | "application/json" | "application/json; charset=utf-8" | "application/x-www-form-urlencoded" | "application/x-www-form-urlencoded; charset=utf-8"
  • Optional includeContentLength?: boolean | null
  • Optional method?: null | "POST" | "GET" | "PUT" | "PATCH" | "DELETE"

WorkflowDefinitionProps

WorkflowDefinitionProps: { appliesTo?: WorkflowDefinitionValidationLink[]; description?: string; name: string; steps: WorkflowStepProps[]; sys: WorkflowDefinitionSysProps }

Type declaration

  • Optional appliesTo?: WorkflowDefinitionValidationLink[]
  • Optional description?: string
  • name: string
  • steps: WorkflowStepProps[]
  • sys: WorkflowDefinitionSysProps

WorkflowDefinitionQueryOptions

WorkflowDefinitionQueryOptions: Omit<PaginationQueryOptions, "order">

WorkflowProps

WorkflowProps: { stepId?: string; sys: WorkflowSysProps }

Type declaration

  • Optional stepId?: string
  • sys: WorkflowSysProps

WorkflowQueryOptions

WorkflowQueryOptions: Omit<PaginationQueryOptions, "order"> & { order?: OrderQueryParam; stepId[in]?: string; sys.entity.sys.id[in]?: string; sys.entity.sys.linkType?: string; sys.workflowDefinition.sys.id?: string }

WorkflowsChangelogEntryProps

WorkflowsChangelogEntryProps: { entity: Link<"Entry">; event: string; eventAt: string; eventBy: SysLink; stepAnnotations: string[]; stepId: string; stepName: string; workflow: Link<"Workflow">; workflowDefinition: Link<"WorkflowDefinition"> }

Type declaration

  • entity: Link<"Entry">
  • event: string
  • eventAt: string
  • eventBy: SysLink
  • stepAnnotations: string[]
  • stepId: string
  • stepName: string
  • workflow: Link<"Workflow">
  • workflowDefinition: Link<"WorkflowDefinition">

WorkflowsChangelogQueryOptions

WorkflowsChangelogQueryOptions: Omit<PaginationQueryOptions, "order"> & { entity.sys.id: string; entity.sys.linkType: string; workflow.sys.id: string }

Functions

Const asIterator

  • asIterator<P, T, F>(fn: F, params: ParamsType<F>): AsyncIterable<T>

createClient

  • createClient(params: ClientOptions): ClientAPI
  • createClient(params: ClientOptions, opts: { defaults?: DefaultParams; type: "plain" }): PlainClientAPI
  • createClient<T>(params: ClientOptions, opts: { alphaFeatures: T; defaults?: DefaultParams; type: "plain" }): AlphaPlainClientAPI
  • createClient(params: ClientOptions, opts: { alphaFeatures: string[]; defaults?: DefaultParams; type: "plain" }): PlainClientAPI
  • Create a client instance

    Parameters

    • params: ClientOptions

      Client initialization parameters

      const client = contentfulManagement.createClient({
      accessToken: 'myAccessToken'
      })

    Returns ClientAPI

  • Parameters

    • params: ClientOptions
    • opts: { defaults?: DefaultParams; type: "plain" }
      • Optional defaults?: DefaultParams
      • type: "plain"

    Returns PlainClientAPI

  • Type parameters

    • T: (readonly string[] & {}) | (readonly ["workflows"] & {})

    Parameters

    • params: ClientOptions
    • opts: { alphaFeatures: T; defaults?: DefaultParams; type: "plain" }
      • alphaFeatures: T
      • Optional defaults?: DefaultParams
      • type: "plain"

    Returns AlphaPlainClientAPI

  • Parameters

    • params: ClientOptions
    • opts: { alphaFeatures: string[]; defaults?: DefaultParams; type: "plain" }
      • alphaFeatures: string[]
      • Optional defaults?: DefaultParams
      • type: "plain"

    Returns PlainClientAPI

Const isDraft

Const isPublished

Const isUpdated