Options
All
  • Public
  • Public/Protected
  • All
Menu

contentful-management.js - v7.14.0

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

ActionType

ActionType: "read" | "create" | "update" | "delete" | "publish" | "unpublish" | "archive" | "unarchive"

AdapterParams

AdapterParams: { apiAdapter: Adapter }

Type declaration

ApiKeyProps

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

Type declaration

AppBundleFile

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

Type declaration

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

AppBundleProps

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

Type declaration

  • Optional comment?: undefined | string

    A comment that describes this bundle

  • files: AppBundleFile[]

    List of all the files that are in this bundle

  • sys: AppBundleSys

    System metadata

AppBundleSys

AppBundleSys: Except<BasicMetaSysProps, "version"> & { appDefinition: SysLink; organization: SysLink }

AppDefinition

AppDefinitionProps

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

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?: undefined | { instance?: ParameterDefinition[] }

    Instance parameter definitions

  • Optional src?: undefined | string

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

  • sys: BasicMetaSysProps & { organization: SysLink }

    System metadata

AppInstallationProps

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

Type declaration

AppLocation

AppUploadProps

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

Type declaration

AppUploadSys

AppUploadSys: Except<BasicMetaSysProps, "version">

AssetApi

AssetApi: { archive: any; delete: any; isArchived: any; isDraft: any; isPublished: any; isUpdated: any; processForAllLocales: any; processForLocale: any; publish: any; unarchive: any; unpublish: any; update: any }

Type declaration

  • archive: function
    • archive(): Promise<Asset>
    • Archives the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getAsset('<asset_id>'))
      .then((asset) => asset.archive())
      .then((asset) => console.log(`Asset ${asset.sys.id} archived.`)
      .catch(console.error)

      Returns Promise<Asset>

      Object returned from the server with updated metadata.

  • delete: function
    • delete(): Promise<void>
    • Deletes this object on the server.

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getAsset('<asset_id>'))
      .then((asset) => asset.delete())
      .then((asset) => console.log(`Asset deleted.`)
      .catch(console.error)

      Returns Promise<void>

      Promise for the deletion. It contains no data, but the Promise error case should be handled.

  • isArchived: function
    • isArchived(): boolean
    • Checks if asset is archived. This means it's not exposed to the Delivery/Preview APIs.

      Returns boolean

  • isDraft: function
    • isDraft(): boolean
  • isPublished: function
    • isPublished(): boolean
    • Checks if the asset is published. A published asset might have unpublished changes

      Returns boolean

  • isUpdated: function
    • isUpdated(): boolean
    • Checks if the asset is updated. This means the asset was previously published but has unpublished changes.

      Returns boolean

  • processForAllLocales: function
    • Triggers asset processing after an upload, for the files uploaded to all locales of an asset.

      prop

      options.processingCheckWait - Time in milliseconds to wait before checking again if the asset has been processed (default: 500ms)

      prop

      options.processingCheckRetries - Maximum amount of times to check if the asset has been processed (default: 5)

      throws

      {AssetProcessingTimeout} If the asset takes too long to process. If this happens, retrieve the asset again, and if the url property is available, then processing has succeeded. If not, your file might be damaged.

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.createAssetWithId('<asset_id>', {
        title: {
          'en-US': 'Playsam Streamliner',
          'de-DE': 'Playsam Streamliner'
        },
        file: {
          'en-US': {
            contentType: 'image/jpeg',
            fileName: 'example.jpeg',
            upload: 'https://example.com/example.jpg'
          },
          'de-DE': {
            contentType: 'image/jpeg',
            fileName: 'example.jpeg',
            upload: 'https://example.com/example-de.jpg'
          }
        }
      }))
      .then((asset) => asset.processForAllLocales())
      .then((asset) => console.log(asset))
      .catch(console.error)

      Parameters

      Returns Promise<Asset>

      Object returned from the server with updated metadata.

  • processForLocale: function
    • Triggers asset processing after an upload, for the file uploaded to a specific locale.

      prop

      options.processingCheckWait - Time in milliseconds to wait before checking again if the asset has been processed (default: 500ms)

      prop

      options.processingCheckRetries - Maximum amount of times to check if the asset has been processed (default: 5)

      throws

      {AssetProcessingTimeout} If the asset takes too long to process. If this happens, retrieve the asset again, and if the url property is available, then processing has succeeded. If not, your file might be damaged.

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.createAssetWithId('<asset_id>', {
        title: {
          'en-US': 'Playsam Streamliner',
        },
        file: {
          'en-US': {
            contentType: 'image/jpeg',
            fileName: 'example.jpeg',
            upload: 'https://example.com/example.jpg'
          }
        }
      }))
      .then((asset) => asset.processForLocale('en-US'))
      .then((asset) => console.log(asset))
      .catch(console.error)

      Parameters

      Returns Promise<Asset>

      Object returned from the server with updated metadata.

  • publish: function
    • publish(): Promise<Asset>
    • Publishes the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getAsset('<asset_id>'))
      .then((asset) => asset.publish())
      .then((asset) => console.log(`Asset ${asset.sys.id} published.`)
      .catch(console.error)

      Returns Promise<Asset>

      Object returned from the server with updated metadata.

  • unarchive: function
    • unarchive(): Promise<Asset>
    • Unarchives the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getAsset('<asset_id>'))
      .then((asset) => asset.unarchive())
      .then((asset) => console.log(`Asset ${asset.sys.id} unarchived.`)
      .catch(console.error)

      Returns Promise<Asset>

      Object returned from the server with updated metadata.

  • unpublish: function
    • unpublish(): Promise<Asset>
    • Unpublishes the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getAsset('<asset_id>'))
      .then((asset) => asset.unpublish())
      .then((asset) => console.log(`Asset ${asset.sys.id} unpublished.`)
      .catch(console.error)

      Returns Promise<Asset>

      Object returned from the server with updated metadata.

  • update: function
    • update(): Promise<Asset>
    • Sends an update to the server with any changes made to the object's properties

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getAsset('<asset_id>'))
      .then((asset) => {
        asset.fields.title['en-US'] = 'New asset title'
        return asset.update()
      })
      .then((asset) => console.log(`Asset ${asset.sys.id} updated.`)
      .catch(console.error)

      Returns Promise<Asset>

      Object returned from the server with updated changes.

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?: undefined | {}; file: {}; title: {} }; metadata?: MetadataProps; sys: EntityMetaSysProps }

Type declaration

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

      Description for this asset

    • file: {}

      File object for this asset

      • [key: string]: { contentType: string; details?: Record<string, any>; fileName: string; upload?: undefined | string; uploadFrom?: Record<string, any>; url?: undefined | 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?: undefined | 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?: undefined | 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

ClientAPI

ClientAPI: ReturnType<typeof createClientApi>

ClientOptions

ClientParams

deprecated

ConditionType

ConditionType: "and" | "or" | "not" | "equals"

ConstraintType

ConstraintType: {}

Type declaration

ContentTypeApi

ContentTypeApi: { delete: any; getEditorInterface: any; getSnapshot: any; getSnapshots: any; isDraft: any; isPublished: any; isUpdated: any; omitAndDeleteField: any; publish: any; unpublish: any; update: any }

Type declaration

  • delete: function
    • delete(): Promise<void>
    • Deletes this object on the server.

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getContentType('<contentType_id>'))
      .then((contentType) => contentType.delete())
      .then(() => console.log('contentType deleted'))
      .catch(console.error)

      Returns Promise<void>

      Promise for the deletion. It contains no data, but the Promise error case should be handled.

  • getEditorInterface: function
    • Gets the editor interface for the object
      Important note: The editor interface only represent a published contentType.
      To get the most recent representation of the contentType make sure to publish it first

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getContentType('<contentType_id>'))
      .then((contentType) => contentType.getEditorInterface())
      .then((editorInterface) => console.log(editorInterface.contorls))
      .catch(console.error)

      Returns Promise<EditorInterface>

      Object returned from the server with the current editor interface.

  • getSnapshot: function
    • Gets a snapshot of a contentType

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getContentType('<contentType_id>'))
      .then((entry) => entry.getSnapshot('<snapshot-id>'))
      .then((snapshot) => console.log(snapshot))
      .catch(console.error)

      Parameters

      • snapshotId: string

        Id of the snapshot

      Returns Promise<SnapshotProps<ContentTypeProps>>

  • getSnapshots: function
    • Gets all snapshots of a contentType

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getContentType('<contentType_id>'))
      .then((entry) => entry.getSnapshots())
      .then((snapshots) => console.log(snapshots.items))
      .catch(console.error)

      Returns Promise<Collection<Snapshot<ContentTypeProps>, SnapshotProps<ContentTypeProps>>>

  • isDraft: function
    • isDraft(): boolean
  • isPublished: function
    • isPublished(): boolean
    • Checks if the contentType is published. A published contentType might have unpublished changes (@see {ContentType.isUpdated})

      Returns boolean

  • isUpdated: function
    • isUpdated(): boolean
    • Checks if the contentType is updated. This means the contentType was previously published but has unpublished changes.

      Returns boolean

  • omitAndDeleteField: function
    • Omits and deletes a field if it exists on the contentType. This is a convenience method which does both operations at once and potentially less safe than the standard way. See note about deleting fields on the Update method.

      Parameters

      • id: string

      Returns Promise<ContentType>

      Object returned from the server with updated metadata.

  • publish: function
    • Publishes the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getContentType('<contentType_id>'))
      .then((contentType) => contentType.publish())
      .then((contentType) => console.log(`${contentType.sys.id} is published`))
      .catch(console.error)

      Returns Promise<ContentType>

      Object returned from the server with updated metadata.

  • unpublish: function
    • Unpublishes the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getContentType('<contentType_id>'))
      .then((contentType) => contentType.unpublish())
      .then((contentType) => console.log(`${contentType.sys.id} is unpublished`))
      .catch(console.error)

      Returns Promise<ContentType>

      Object returned from the server with updated metadata.

  • update: function
    • Sends an update to the server with any changes made to the object's properties.
      Important note about deleting fields: The standard way to delete a field is with two updates: first omit the property from your responses (set the field attribute "omitted" to true), and then delete it by setting the attribute "deleted" to true. See the "Deleting fields" section in the API reference for more reasoning. Alternatively, you may use the convenience method omitAndDeleteField to do both steps at once.

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getContentType('<contentType_id>'))
      .then((contentType) => {
       contentType.name = 'New name'
       return contentType.update()
      })
      .then(contentType => console.log(contentType))
      .catch(console.error)

      Returns Promise<ContentType>

      Object returned from the server with updated changes.

ContentTypeProps

ContentTypeProps: { description: string; displayField: string; fields: ContentFields[]; name: string; sys: BasicMetaSysProps & { environment: SysLink; firstPublishedAt?: undefined | string; publishedCounter?: undefined | number; publishedVersion?: undefined | 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

  • name: string
  • sys: BasicMetaSysProps & { environment: SysLink; firstPublishedAt?: undefined | string; publishedCounter?: undefined | number; publishedVersion?: undefined | number; space: SysLink }

ContentfulAppDefinitionAPI

ContentfulAppDefinitionAPI: ReturnType<typeof createAppDefinitionApi>

ContentfulEnvironmentAPI

ContentfulEnvironmentAPI: ReturnType<typeof createEnvironmentApi>

ContentfulOrganizationAPI

ContentfulOrganizationAPI: ReturnType<typeof createOrganizationApi>

ContentfulSpaceAPI

ContentfulSpaceAPI: ReturnType<typeof createSpaceApi>

CreateApiKeyProps

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

CreateAppBundleProps

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

Type declaration

  • appUploadId: string
  • Optional comment?: undefined | string

CreateAppDefinitionProps

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

CreateAppInstallationProps

CreateAppInstallationProps: Except<AppInstallationProps, "sys">

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">

CreateContentTypeProps

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

CreateEntryProps

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

Type parameters

  • TFields = KeyValueMap

CreateEnvironmentAliasProps

CreateEnvironmentAliasProps: Omit<EnvironmentAliasProps, "sys">

CreateEnvironmentProps

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

CreateExtensionProps

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

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">

CreateTeamMembershipProps

CreateTeamMembershipProps: Omit<TeamMembershipProps, "sys">

CreateTeamProps

CreateTeamProps: Omit<TeamProps, "sys">

CreateTeamSpaceMembershipProps

CreateTeamSpaceMembershipProps: Omit<TeamSpaceMembershipProps, "sys">

CreateWebhooksProps

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

DefaultParams

DefaultParams: { environmentId?: undefined | string; organizationId?: undefined | string; spaceId?: undefined | string }

Type declaration

  • Optional environmentId?: undefined | string
  • Optional organizationId?: undefined | string
  • Optional spaceId?: undefined | string

DefinedParameters

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

EditorInterfaceProps

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

Type declaration

  • Optional controls?: Control[]

    Array of fields and it's associated widgetId

  • Optional editor?: Editor

    Legacy singular editor override

  • Optional editors?: Editor[]

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

  • Optional sidebar?: SidebarItem[]

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

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

EntryApi

EntryApi: { archive: any; delete: any; getSnapshot: any; getSnapshots: any; isArchived: any; isDraft: any; isPublished: any; isUpdated: any; publish: any; unarchive: any; unpublish: any; update: any }

Type declaration

  • archive: function
    • archive(): Promise<Entry>
    • Archives the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => entry.archive())
      .then((entry) => console.log(`Entry ${entry.sys.id} archived.`))
      .catch(console.error)

      Returns Promise<Entry>

      Object returned from the server with updated metadata.

  • delete: function
    • delete(): Promise<void>
    • Deletes this object on the server.

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => entry.delete())
      .then(() => console.log(`Entry deleted.`))
      .catch(console.error)

      Returns Promise<void>

      Promise for the deletion. It contains no data, but the Promise error case should be handled.

  • getSnapshot: function
    • Gets a snapshot of an entry

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => entry.getSnapshot('<snapshot_id>'))
      .then((snapshot) => console.log(snapshot))
      .catch(console.error)

      Parameters

      • snapshotId: string

        Id of the snapshot

      Returns Promise<Snapshot<EntryProps>>

  • getSnapshots: function
    • Gets all snapshots of an entry

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => entry.getSnapshots())
      .then((snapshots) => console.log(snapshots.items))
      .catch(console.error)

      Returns Promise<Collection<Snapshot<EntryProps>, SnapshotProps<EntryProps>>>

  • isArchived: function
    • isArchived(): boolean
    • Checks if entry is archived. This means it's not exposed to the Delivery/Preview APIs.

      Returns boolean

  • isDraft: function
    • isDraft(): boolean
  • isPublished: function
    • isPublished(): boolean
    • Checks if the entry is published. A published entry might have unpublished changes

      Returns boolean

  • isUpdated: function
    • isUpdated(): boolean
    • Checks if the entry is updated. This means the entry was previously published but has unpublished changes.

      Returns boolean

  • publish: function
    • publish(): Promise<Entry>
    • Publishes the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => entry.publish())
      .then((entry) => console.log(`Entry ${entry.sys.id} published.`))
      .catch(console.error)

      Returns Promise<Entry>

      Object returned from the server with updated metadata.

  • unarchive: function
    • unarchive(): Promise<Entry>
    • Unarchives the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => entry.unarchive())
      .then((entry) => console.log(`Entry ${entry.sys.id} unarchived.`))
      .catch(console.error)

      Returns Promise<Entry>

      Object returned from the server with updated metadata.

  • unpublish: function
    • unpublish(): Promise<Entry>
    • Unpublishes the object

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => entry.unpublish())
      .then((entry) => console.log(`Entry ${entry.sys.id} unpublished.`))
      .catch(console.error)

      Returns Promise<Entry>

      Object returned from the server with updated metadata.

  • update: function
    • update(): Promise<Entry>
    • Sends an update to the server with any changes made to the object's properties

      example
      const contentful = require('contentful-management')
      
      const client = contentful.createClient({
        accessToken: '<content_management_api_key>'
      })
      
      client.getSpace('<space_id>')
      .then((space) => space.getEnvironment('<environment_id>'))
      .then((environment) => environment.getEntry('<entry_id>'))
      .then((entry) => {
        entry.fields.title['en-US'] = 'New entry title'
        return entry.update()
      })
      .then((entry) => console.log(`Entry ${entry.sys.id} updated.`))
      .catch(console.error)

      Returns Promise<Entry>

      Object returned from the server with updated changes.

EntryProps

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

Type parameters

  • T = KeyValueMap

Type declaration

Environment

EnvironmentAliasProps

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

Type declaration

EnvironmentMetaSys

EnvironmentMetaSys: BasicMetaSysProps & { aliasedEnvironment?: SysLink; aliases?: Array<SysLink>; space: SysLink; status: SysLink }

EnvironmentProps

EnvironmentProps: { name: string; sys: EnvironmentMetaSys }

Type declaration

ExtensionProps

ExtensionProps: { extension: { fieldTypes: FieldType[]; name: string; parameters?: undefined | { installation?: ParameterDefinition[]; instance?: ParameterDefinition[] }; sidebar?: undefined | false | true; src?: undefined | string; srcdoc?: undefined | string }; parameters?: DefinedParameters; sys: ExtensionSysProps }

Type declaration

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

      Field types where an extension can be used

    • name: string

      Extension name

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

      Parameter definitions

    • Optional sidebar?: undefined | false | true

      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?: undefined | string

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

    • Optional srcdoc?: undefined | string

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

  • Optional parameters?: DefinedParameters

    Values for installation parameters

  • sys: ExtensionSysProps

ExtensionSysProps

ExtensionSysProps: BasicMetaSysProps & { environment: SysLink; space: SysLink; srcdocSha256?: undefined | string }

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> | Array<any> | number | string | boolean

GetAppBundleParams

GetAppBundleParams: GetAppDefinitionParams & { appBundleId: string }

GetAppDefinitionParams

GetAppDefinitionParams: GetOrganizationParams & { appDefinitionId: string }

GetAppInstallationParams

GetAppInstallationParams: GetSpaceEnvironmentParams & { appDefinitionId: string }

GetAppUploadParams

GetAppUploadParams: GetOrganizationParams & { appUploadId: string }

GetContentTypeParams

GetContentTypeParams: GetSpaceEnvironmentParams & { contentTypeId: string }

GetEditorInterfaceParams

GetEditorInterfaceParams: GetSpaceEnvironmentParams & { contentTypeId: string }

GetExtensionParams

GetExtensionParams: GetSpaceEnvironmentParams & { extensionId: string }

GetOrganizationMembershipProps

GetOrganizationMembershipProps: GetOrganizationParams & { organizationMembershipId: string }

GetOrganizationParams

GetOrganizationParams: { organizationId: string }

Type declaration

  • organizationId: 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 }

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 }

ISO8601Timestamp

ISO8601Timestamp: string

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

IterableFn

IterableFn<P, T>: (params: P) => Promise<CollectionProp<T>>

Type parameters

  • P = any

  • T = any

Type declaration

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 }

LocationType

LocationType: "app-config" | "entry-sidebar" | "entry-editor" | "dialog" | "page"

MRActions

MRActions: { ApiKey: { create: { headers?: Record<string, unknown>; params: GetSpaceParams; payload: CreateApiKeyProps; return: ApiKeyProps }; createWithId: { headers?: Record<string, unknown>; params: GetSpaceParams & { apiKeyId: string }; payload: CreateApiKeyProps; return: ApiKeyProps }; delete: { params: GetSpaceParams & { apiKeyId: string }; return: any }; get: { params: GetSpaceParams & { apiKeyId: string }; return: ApiKeyProps }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<ApiKeyProps> }; update: { headers?: Record<string, unknown>; params: GetSpaceParams & { apiKeyId: string }; payload: ApiKeyProps; return: ApiKeyProps } }; AppBundle: { create: { params: GetAppDefinitionParams; payload: CreateAppBundleProps; return: AppBundleProps }; delete: { params: GetAppBundleParams; return: void }; get: { params: GetAppBundleParams; return: AppBundleProps }; getMany: { params: GetAppDefinitionParams & QueryParams; return: CollectionProp<AppBundleProps> } }; AppDefinition: { create: { params: GetOrganizationParams; payload: CreateAppDefinitionProps; return: AppDefinitionProps }; delete: { params: GetAppDefinitionParams; return: any }; get: { params: GetOrganizationParams & { appDefinitionId: string }; return: AppDefinitionProps }; getMany: { params: GetOrganizationParams & QueryParams; return: CollectionProp<AppDefinitionProps> }; update: { headers?: Record<string, unknown>; params: GetAppDefinitionParams; payload: AppDefinitionProps; return: AppDefinitionProps } }; AppInstallation: { delete: { params: GetAppInstallationParams; return: any }; get: { params: GetAppInstallationParams; return: AppInstallationProps }; getMany: { params: GetSpaceEnvironmentParams & PaginationQueryParams; return: CollectionProp<AppInstallationProps> }; upsert: { headers?: Record<string, unknown>; params: GetAppInstallationParams; payload: CreateAppInstallationProps; return: AppInstallationProps } }; AppUpload: { create: { params: GetOrganizationParams; payload: { file: string | ArrayBuffer | Stream }; return: AppUploadProps }; delete: { params: GetAppUploadParams; return: void }; get: { params: GetAppUploadParams; return: AppUploadProps } }; Asset: { archive: { params: GetSpaceEnvironmentParams & { assetId: string }; return: AssetProps }; create: { params: GetSpaceEnvironmentParams; payload: CreateAssetProps; return: AssetProps }; createFromFiles: { params: GetSpaceEnvironmentParams; payload: Omit<AssetFileProp, "sys">; return: AssetProps }; createWithId: { params: GetSpaceEnvironmentParams & { assetId: string }; payload: CreateAssetProps; return: AssetProps }; delete: { params: GetSpaceEnvironmentParams & { assetId: string }; return: any }; get: { params: GetSpaceEnvironmentParams & { assetId: string } & QueryParams; return: AssetProps }; getMany: { params: GetSpaceEnvironmentParams & QueryParams; return: CollectionProp<AssetProps> }; processForAllLocales: { params: GetSpaceEnvironmentParams & { asset: AssetProps; options?: AssetProcessingForLocale }; return: AssetProps }; processForLocale: { params: GetSpaceEnvironmentParams & { asset: AssetProps; locale: string; options?: AssetProcessingForLocale }; return: AssetProps }; publish: { params: GetSpaceEnvironmentParams & { assetId: string }; payload: AssetProps; return: AssetProps }; unarchive: { params: GetSpaceEnvironmentParams & { assetId: string }; return: AssetProps }; unpublish: { params: GetSpaceEnvironmentParams & { assetId: string }; return: AssetProps }; update: { headers?: Record<string, unknown>; params: GetSpaceEnvironmentParams & { assetId: string }; payload: AssetProps; return: AssetProps } }; AssetKey: { create: { params: GetSpaceEnvironmentParams; payload: CreateAssetKeyProps; return: AssetKeyProps } }; ContentType: { create: { params: GetSpaceEnvironmentParams; payload: CreateContentTypeProps; return: ContentTypeProps }; createWithId: { params: GetContentTypeParams; payload: CreateContentTypeProps; return: ContentTypeProps }; delete: { params: GetContentTypeParams; return: any }; get: { params: GetContentTypeParams & QueryParams; return: ContentTypeProps }; getMany: { params: GetSpaceEnvironmentParams & QueryParams; return: CollectionProp<ContentTypeProps> }; publish: { params: GetContentTypeParams; payload: ContentTypeProps; return: ContentTypeProps }; unpublish: { params: GetContentTypeParams; return: ContentTypeProps }; update: { headers?: Record<string, unknown>; params: GetContentTypeParams; payload: ContentTypeProps; return: ContentTypeProps } }; EditorInterface: { get: { params: GetEditorInterfaceParams; return: EditorInterfaceProps }; getMany: { params: GetSpaceEnvironmentParams & QueryParams; return: CollectionProp<EditorInterfaceProps> }; update: { headers?: Record<string, unknown>; params: GetEditorInterfaceParams; payload: EditorInterfaceProps; return: EditorInterfaceProps } }; Entry: { archive: { params: GetSpaceEnvironmentParams & { entryId: string }; return: EntryProps<any> }; create: { params: GetSpaceEnvironmentParams & { contentTypeId: string }; payload: CreateEntryProps<any>; return: EntryProps<any> }; createWithId: { params: GetSpaceEnvironmentParams & { contentTypeId: string; entryId: string }; payload: CreateEntryProps<any>; return: EntryProps<any> }; delete: { params: GetSpaceEnvironmentParams & { entryId: string }; return: any }; get: { params: GetSpaceEnvironmentParams & { entryId: string } & QueryParams; return: EntryProps<any> }; getMany: { params: GetSpaceEnvironmentParams & QueryParams; return: CollectionProp<EntryProps<any>> }; publish: { params: GetSpaceEnvironmentParams & { entryId: string }; payload: EntryProps<any>; return: EntryProps<any> }; unarchive: { params: GetSpaceEnvironmentParams & { entryId: string }; return: EntryProps<any> }; unpublish: { params: GetSpaceEnvironmentParams & { entryId: string }; return: EntryProps<any> }; update: { headers?: Record<string, unknown>; params: GetSpaceEnvironmentParams & { entryId: string }; payload: EntryProps<any>; return: EntryProps<any> } }; Environment: { create: { headers?: Record<string, unknown>; params: GetSpaceParams; payload: Partial<Pick<EnvironmentProps, "name">>; return: EnvironmentProps }; createWithId: { headers?: Record<string, unknown>; params: GetSpaceEnvironmentParams & { sourceEnvironmentId?: undefined | string }; payload: CreateEnvironmentProps; return: EnvironmentProps }; delete: { params: GetSpaceEnvironmentParams; return: any }; get: { params: GetSpaceEnvironmentParams; return: EnvironmentProps }; getMany: { params: GetSpaceParams & PaginationQueryParams; return: CollectionProp<EnvironmentProps> }; update: { headers?: Record<string, unknown>; params: GetSpaceEnvironmentParams; payload: EnvironmentProps; return: EnvironmentProps } }; EnvironmentAlias: { createWithId: { headers?: Record<string, unknown>; params: GetSpaceEnvAliasParams; payload: CreateEnvironmentAliasProps; return: EnvironmentAliasProps }; delete: { params: GetSpaceEnvAliasParams; return: any }; get: { params: GetSpaceEnvAliasParams; return: EnvironmentAliasProps }; getMany: { params: GetSpaceParams & PaginationQueryParams; return: CollectionProp<EnvironmentAliasProps> }; update: { headers?: Record<string, unknown>; params: GetSpaceEnvAliasParams; payload: EnvironmentAliasProps; return: EnvironmentAliasProps } }; Extension: { create: { headers?: Record<string, unknown>; params: GetSpaceEnvironmentParams; payload: CreateExtensionProps; return: ExtensionProps }; createWithId: { headers?: Record<string, unknown>; params: GetExtensionParams; payload: CreateExtensionProps; return: ExtensionProps }; delete: { params: GetExtensionParams; return: any }; get: { params: GetExtensionParams & QueryParams; return: ExtensionProps }; getMany: { params: GetSpaceEnvironmentParams & QueryParams; return: CollectionProp<ExtensionProps> }; update: { headers?: Record<string, unknown>; params: GetExtensionParams; payload: ExtensionProps; return: ExtensionProps } }; Http: { delete: { params: { config?: AxiosRequestConfig; url: string }; return: any }; get: { params: { config?: AxiosRequestConfig; url: string }; return: any }; post: { params: { config?: AxiosRequestConfig; url: string }; payload: any; return: any }; put: { params: { config?: AxiosRequestConfig; url: string }; payload: any; return: any }; request: { params: { config?: AxiosRequestConfig; url: string }; return: any } }; Locale: { create: { headers?: Record<string, unknown>; params: GetSpaceEnvironmentParams; payload: CreateLocaleProps; return: LocaleProps }; delete: { params: GetSpaceEnvironmentParams & { localeId: string }; return: any }; get: { params: GetSpaceEnvironmentParams & { localeId: string }; return: LocaleProps }; getMany: { params: GetSpaceEnvironmentParams & QueryParams; return: CollectionProp<LocaleProps> }; update: { headers?: Record<string, unknown>; params: GetSpaceEnvironmentParams & { localeId: string }; payload: LocaleProps; return: LocaleProps } }; Organization: { get: { params: GetOrganizationParams; return: OrganizationProp }; getMany: { return: CollectionProp<OrganizationProp> } }; OrganizationInvitation: { create: { headers?: Record<string, unknown>; params: { organizationId: string }; payload: CreateOrganizationInvitationProps; return: OrganizationInvitationProps }; get: { headers?: Record<string, unknown>; params: { invitationId: string; organizationId: string }; return: OrganizationInvitationProps } }; OrganizationMembership: { delete: { params: GetOrganizationMembershipProps; return: any }; get: { params: GetOrganizationMembershipProps; return: OrganizationMembershipProps }; getMany: { params: GetOrganizationParams & QueryParams; return: CollectionProp<OrganizationMembershipProps> }; update: { headers?: Record<string, unknown>; params: GetOrganizationMembershipProps; payload: OrganizationMembershipProps; return: OrganizationMembershipProps } }; PersonalAccessToken: { create: { headers?: Record<string, unknown>; params: {}; payload: CreatePersonalAccessTokenProps; return: PersonalAccessTokenProp }; get: { params: { tokenId: string }; return: PersonalAccessTokenProp }; getMany: { params: QueryParams; return: CollectionProp<PersonalAccessTokenProp> }; revoke: { params: { tokenId: string }; return: PersonalAccessTokenProp } }; PreviewApiKey: { get: { params: GetSpaceParams & { previewApiKeyId: string }; return: PreviewApiKeyProps }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<PreviewApiKeyProps> } }; Role: { create: { headers?: Record<string, unknown>; params: GetSpaceParams; payload: CreateRoleProps; return: RoleProps }; createWithId: { headers?: Record<string, unknown>; params: GetSpaceParams & { roleId: string }; payload: CreateRoleProps; return: RoleProps }; delete: { params: GetSpaceParams & { roleId: string }; return: any }; get: { params: GetSpaceParams & { roleId: string }; return: RoleProps }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<RoleProps> }; update: { headers?: Record<string, unknown>; params: GetSpaceParams & { roleId: string }; payload: RoleProps; return: RoleProps } }; ScheduledAction: { create: { params: GetSpaceParams; payload: Omit<ScheduledActionProps, "sys">; return: ScheduledActionProps }; delete: { params: GetSpaceParams & { scheduledActionId: string }; return: any }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<ScheduledActionProps> } }; Snapshot: { getForContentType: { params: GetSnapshotForContentTypeParams & { snapshotId: string }; return: SnapshotProps<ContentTypeProps> }; getForEntry: { params: GetSnapshotForEntryParams & { snapshotId: string }; return: SnapshotProps<EntryProps<any>> }; getManyForContentType: { params: GetSnapshotForContentTypeParams & QueryParams; return: CollectionProp<SnapshotProps<ContentTypeProps>> }; getManyForEntry: { params: GetSnapshotForEntryParams & QueryParams; return: CollectionProp<SnapshotProps<EntryProps<any>>> } }; Space: { create: { headers?: Record<string, unknown>; params: { organizationId?: undefined | string }; payload: Omit<SpaceProps, "sys">; return: any }; delete: { params: GetSpaceParams; return: void }; get: { params: GetSpaceParams; return: SpaceProps }; getMany: { params: QueryParams; return: CollectionProp<SpaceProps> }; update: { headers?: Record<string, unknown>; params: GetSpaceParams; payload: SpaceProps; return: SpaceProps } }; SpaceMember: { get: { params: GetSpaceParams & { spaceMemberId: string }; return: SpaceMemberProps }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<SpaceMemberProps> } }; SpaceMembership: { create: { headers?: Record<string, unknown>; params: GetSpaceParams; payload: CreateSpaceMembershipProps; return: SpaceMembershipProps }; createWithId: { headers?: Record<string, unknown>; params: GetSpaceMembershipProps; payload: CreateSpaceMembershipProps; return: SpaceMembershipProps }; delete: { params: GetSpaceMembershipProps; return: any }; get: { params: GetSpaceMembershipProps; return: SpaceMembershipProps }; getForOrganization: { params: GetOrganizationParams & { spaceMembershipId: string }; return: SpaceMembershipProps }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<SpaceMembershipProps> }; getManyForOrganization: { params: GetOrganizationParams & QueryParams; return: CollectionProp<SpaceMembershipProps> }; update: { headers?: Record<string, unknown>; params: GetSpaceMembershipProps; payload: SpaceMembershipProps; return: SpaceMembershipProps } }; Tag: { createWithId: { params: GetTagParams; payload: CreateTagProps; return: TagProps }; delete: { params: GetTagParams & { version: number }; return: any }; get: { params: GetTagParams; return: TagProps }; getMany: { params: GetSpaceEnvironmentParams & QueryParams; return: CollectionProp<TagProps> }; update: { headers?: Record<string, unknown>; params: GetTagParams; payload: TagProps; return: TagProps } }; Team: { create: { headers?: Record<string, unknown>; params: GetOrganizationParams; payload: CreateTeamProps; return: any }; delete: { params: GetTeamParams; return: any }; get: { params: GetTeamParams; return: TeamProps }; getMany: { params: GetOrganizationParams & QueryParams; return: CollectionProp<TeamProps> }; update: { headers?: Record<string, unknown>; params: GetTeamParams; payload: TeamProps; return: TeamProps } }; TeamMembership: { create: { headers?: Record<string, unknown>; params: GetTeamParams; payload: CreateTeamMembershipProps; return: TeamMembershipProps }; delete: { params: GetTeamMembershipParams; return: any }; get: { params: GetTeamMembershipParams; return: TeamMembershipProps }; getManyForOrganization: { params: GetOrganizationParams & QueryParams; return: CollectionProp<TeamMembershipProps> }; getManyForTeam: { params: GetTeamParams & QueryParams; return: CollectionProp<TeamMembershipProps> }; update: { headers?: Record<string, unknown>; params: GetTeamMembershipParams; payload: TeamMembershipProps; return: TeamMembershipProps } }; TeamSpaceMembership: { create: { headers?: Record<string, unknown>; params: GetSpaceParams & { teamId: string }; payload: CreateTeamSpaceMembershipProps; return: TeamSpaceMembershipProps }; delete: { params: GetTeamSpaceMembershipParams; return: any }; get: { params: GetTeamSpaceMembershipParams; return: TeamSpaceMembershipProps }; getForOrganization: { params: GetOrganizationParams & { teamSpaceMembershipId: string }; return: TeamSpaceMembershipProps }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<TeamSpaceMembershipProps> }; getManyForOrganization: { params: GetOrganizationParams & QueryParams & { teamId?: undefined | string }; return: CollectionProp<TeamSpaceMembershipProps> }; update: { headers?: Record<string, unknown>; params: GetTeamSpaceMembershipParams; payload: TeamSpaceMembershipProps; return: TeamSpaceMembershipProps } }; Upload: { create: { params: GetSpaceParams; payload: { file: string | ArrayBuffer | Stream }; return: any }; delete: { params: GetSpaceParams & { uploadId: string }; return: any }; get: { params: GetSpaceParams & { uploadId: string }; return: any } }; Usage: { getManyForOrganization: { params: { organizationId: string } & QueryParams; return: CollectionProp<UsageProps> }; getManyForSpace: { params: { organizationId: string } & QueryParams; return: CollectionProp<UsageProps> } }; User: { getCurrent: { params?: QueryParams; return: any }; getForOrganization: { params: GetOrganizationParams & { userId: string }; return: UserProps }; getForSpace: { params: GetSpaceParams & { userId: string }; return: UserProps }; getManyForOrganization: { params: GetOrganizationParams & QueryParams; return: CollectionProp<UserProps> }; getManyForSpace: { params: GetSpaceParams & QueryParams; return: CollectionProp<UserProps> } }; Webhook: { create: { headers?: Record<string, unknown>; params: GetSpaceParams; payload: CreateWebhooksProps; return: WebhookProps }; createWithId: { headers?: Record<string, unknown>; params: GetWebhookParams; payload: CreateWebhooksProps; return: WebhookProps }; delete: { params: GetWebhookParams; return: void }; get: { params: GetWebhookParams; return: WebhookProps }; getCallDetails: { params: GetWebhookCallDetailsUrl; return: WebhookCallDetailsProps }; getHealthStatus: { params: GetWebhookParams; return: WebhookHealthProps }; getMany: { params: GetSpaceParams & QueryParams; return: CollectionProp<WebhookProps> }; getManyCallDetails: { params: GetWebhookParams & QueryParams; return: CollectionProp<WebhookCallOverviewProps> }; update: { params: GetWebhookParams; payload: WebhookProps; return: WebhookProps } } }

Type declaration

MRInternal

MRInternal<UA>: { (opts: MROpts<"Http", "get", UA>): MRReturn<"Http", "get">; (opts: MROpts<"Http", "post", UA>): MRReturn<"Http", "post">; (opts: MROpts<"Http", "put", UA>): MRReturn<"Http", "put">; (opts: MROpts<"Http", "delete", UA>): MRReturn<"Http", "delete">; (opts: MROpts<"Http", "request", UA>): MRReturn<"Http", "request">; (opts: MROpts<"AppBundle", "get", UA>): MRReturn<"AppBundle", "get">; (opts: MROpts<"AppBundle", "getMany", UA>): MRReturn<"AppBundle", "getMany">; (opts: MROpts<"AppBundle", "delete", UA>): MRReturn<"AppBundle", "delete">; (opts: MROpts<"AppBundle", "create", UA>): MRReturn<"AppBundle", "create">; (opts: MROpts<"ApiKey", "get", UA>): MRReturn<"ApiKey", "get">; (opts: MROpts<"ApiKey", "getMany", UA>): MRReturn<"ApiKey", "getMany">; (opts: MROpts<"ApiKey", "create", UA>): MRReturn<"ApiKey", "create">; (opts: MROpts<"ApiKey", "createWithId", UA>): MRReturn<"ApiKey", "createWithId">; (opts: MROpts<"ApiKey", "update", UA>): MRReturn<"ApiKey", "update">; (opts: MROpts<"ApiKey", "delete", UA>): MRReturn<"ApiKey", "delete">; (opts: MROpts<"AppDefinition", "get", UA>): MRReturn<"AppDefinition", "get">; (opts: MROpts<"AppDefinition", "getMany", UA>): MRReturn<"AppDefinition", "getMany">; (opts: MROpts<"AppDefinition", "create", UA>): MRReturn<"AppDefinition", "create">; (opts: MROpts<"AppDefinition", "update", UA>): MRReturn<"AppDefinition", "update">; (opts: MROpts<"AppDefinition", "delete", UA>): MRReturn<"AppDefinition", "delete">; (opts: MROpts<"AppInstallation", "get", UA>): MRReturn<"AppInstallation", "get">; (opts: MROpts<"AppInstallation", "getMany", UA>): MRReturn<"AppInstallation", "getMany">; (opts: MROpts<"AppInstallation", "upsert", UA>): MRReturn<"AppInstallation", "upsert">; (opts: MROpts<"AppInstallation", "delete", UA>): MRReturn<"AppInstallation", "delete">; (opts: MROpts<"Asset", "getMany", UA>): MRReturn<"Asset", "getMany">; (opts: MROpts<"Asset", "get", UA>): MRReturn<"Asset", "get">; (opts: MROpts<"Asset", "update", UA>): MRReturn<"Asset", "update">; (opts: MROpts<"Asset", "delete", UA>): MRReturn<"Asset", "delete">; (opts: MROpts<"Asset", "publish", UA>): MRReturn<"Asset", "publish">; (opts: MROpts<"Asset", "unpublish", UA>): MRReturn<"Asset", "unpublish">; (opts: MROpts<"Asset", "archive", UA>): MRReturn<"Asset", "archive">; (opts: MROpts<"Asset", "unarchive", UA>): MRReturn<"Asset", "unarchive">; (opts: MROpts<"Asset", "create", UA>): MRReturn<"Asset", "create">; (opts: MROpts<"Asset", "createWithId", UA>): MRReturn<"Asset", "createWithId">; (opts: MROpts<"Asset", "createFromFiles", UA>): MRReturn<"Asset", "createFromFiles">; (opts: MROpts<"Asset", "processForAllLocales", UA>): MRReturn<"Asset", "processForAllLocales">; (opts: MROpts<"Asset", "processForLocale", UA>): MRReturn<"Asset", "processForLocale">; (opts: MROpts<"AppUpload", "get", UA>): MRReturn<"AppUpload", "get">; (opts: MROpts<"AppUpload", "delete", UA>): MRReturn<"AppUpload", "delete">; (opts: MROpts<"AppUpload", "create", UA>): MRReturn<"AppUpload", "create">; (opts: MROpts<"AssetKey", "create", UA>): MRReturn<"AssetKey", "create">; (opts: MROpts<"ContentType", "get", UA>): MRReturn<"ContentType", "get">; (opts: MROpts<"ContentType", "getMany", UA>): MRReturn<"ContentType", "getMany">; (opts: MROpts<"ContentType", "update", UA>): MRReturn<"ContentType", "update">; (opts: MROpts<"ContentType", "create", UA>): MRReturn<"ContentType", "create">; (opts: MROpts<"ContentType", "createWithId", UA>): MRReturn<"ContentType", "createWithId">; (opts: MROpts<"ContentType", "delete", UA>): MRReturn<"ContentType", "delete">; (opts: MROpts<"ContentType", "publish", UA>): MRReturn<"ContentType", "publish">; (opts: MROpts<"ContentType", "unpublish", UA>): MRReturn<"ContentType", "unpublish">; (opts: MROpts<"EditorInterface", "get", UA>): MRReturn<"EditorInterface", "get">; (opts: MROpts<"EditorInterface", "getMany", UA>): MRReturn<"EditorInterface", "getMany">; (opts: MROpts<"EditorInterface", "update", UA>): MRReturn<"EditorInterface", "update">; (opts: MROpts<"Environment", "get", UA>): MRReturn<"Environment", "get">; (opts: MROpts<"Environment", "getMany", UA>): MRReturn<"Environment", "getMany">; (opts: MROpts<"Environment", "create", UA>): MRReturn<"Environment", "create">; (opts: MROpts<"Environment", "createWithId", UA>): MRReturn<"Environment", "createWithId">; (opts: MROpts<"Environment", "update", UA>): MRReturn<"Environment", "update">; (opts: MROpts<"Environment", "delete", UA>): MRReturn<"Environment", "delete">; (opts: MROpts<"EnvironmentAlias", "get", UA>): MRReturn<"EnvironmentAlias", "get">; (opts: MROpts<"EnvironmentAlias", "getMany", UA>): MRReturn<"EnvironmentAlias", "getMany">; (opts: MROpts<"EnvironmentAlias", "createWithId", UA>): MRReturn<"EnvironmentAlias", "createWithId">; (opts: MROpts<"EnvironmentAlias", "update", UA>): MRReturn<"EnvironmentAlias", "update">; (opts: MROpts<"EnvironmentAlias", "delete", UA>): MRReturn<"EnvironmentAlias", "delete">; (opts: MROpts<"Entry", "getMany", UA>): MRReturn<"Entry", "getMany">; (opts: MROpts<"Entry", "get", UA>): MRReturn<"Entry", "get">; (opts: MROpts<"Entry", "update", UA>): MRReturn<"Entry", "update">; (opts: MROpts<"Entry", "delete", UA>): MRReturn<"Entry", "delete">; (opts: MROpts<"Entry", "publish", UA>): MRReturn<"Entry", "publish">; (opts: MROpts<"Entry", "unpublish", UA>): MRReturn<"Entry", "unpublish">; (opts: MROpts<"Entry", "archive", UA>): MRReturn<"Entry", "archive">; (opts: MROpts<"Entry", "unarchive", UA>): MRReturn<"Entry", "unarchive">; (opts: MROpts<"Entry", "create", UA>): MRReturn<"Entry", "create">; (opts: MROpts<"Entry", "createWithId", UA>): MRReturn<"Entry", "createWithId">; (opts: MROpts<"Extension", "get", UA>): MRReturn<"Extension", "get">; (opts: MROpts<"Extension", "getMany", UA>): MRReturn<"Extension", "getMany">; (opts: MROpts<"Extension", "create", UA>): MRReturn<"Extension", "create">; (opts: MROpts<"Extension", "createWithId", UA>): MRReturn<"Extension", "createWithId">; (opts: MROpts<"Extension", "update", UA>): MRReturn<"Extension", "update">; (opts: MROpts<"Extension", "delete", UA>): MRReturn<"Extension", "delete">; (opts: MROpts<"Locale", "get", UA>): MRReturn<"Locale", "get">; (opts: MROpts<"Locale", "getMany", UA>): MRReturn<"Locale", "getMany">; (opts: MROpts<"Locale", "delete", UA>): MRReturn<"Locale", "delete">; (opts: MROpts<"Locale", "update", UA>): MRReturn<"Locale", "update">; (opts: MROpts<"Locale", "create", UA>): MRReturn<"Locale", "create">; (opts: MROpts<"Organization", "getMany", UA>): MRReturn<"Organization", "getMany">; (opts: MROpts<"Organization", "get", UA>): MRReturn<"Organization", "get">; (opts: MROpts<"OrganizationInvitation", "get", UA>): MRReturn<"OrganizationInvitation", "get">; (opts: MROpts<"OrganizationInvitation", "create", UA>): MRReturn<"OrganizationInvitation", "create">; (opts: MROpts<"OrganizationMembership", "get", UA>): MRReturn<"OrganizationMembership", "get">; (opts: MROpts<"OrganizationMembership", "getMany", UA>): MRReturn<"OrganizationMembership", "getMany">; (opts: MROpts<"OrganizationMembership", "update", UA>): MRReturn<"OrganizationMembership", "update">; (opts: MROpts<"OrganizationMembership", "delete", UA>): MRReturn<"OrganizationMembership", "delete">; (opts: MROpts<"PersonalAccessToken", "get", UA>): MRReturn<"PersonalAccessToken", "get">; (opts: MROpts<"PersonalAccessToken", "getMany", UA>): MRReturn<"PersonalAccessToken", "getMany">; (opts: MROpts<"PersonalAccessToken", "create", UA>): MRReturn<"PersonalAccessToken", "create">; (opts: MROpts<"PersonalAccessToken", "revoke", UA>): MRReturn<"PersonalAccessToken", "revoke">; (opts: MROpts<"PreviewApiKey", "get", UA>): MRReturn<"PreviewApiKey", "get">; (opts: MROpts<"PreviewApiKey", "getMany", UA>): MRReturn<"PreviewApiKey", "getMany">; (opts: MROpts<"Role", "get", UA>): MRReturn<"Role", "get">; (opts: MROpts<"Role", "getMany", UA>): MRReturn<"Role", "getMany">; (opts: MROpts<"Role", "create", UA>): MRReturn<"Role", "create">; (opts: MROpts<"Role", "createWithId", UA>): MRReturn<"Role", "createWithId">; (opts: MROpts<"Role", "update", UA>): MRReturn<"Role", "update">; (opts: MROpts<"Role", "delete", UA>): MRReturn<"Role", "delete">; (opts: MROpts<"ScheduledAction", "getMany", UA>): MRReturn<"ScheduledAction", "getMany">; (opts: MROpts<"ScheduledAction", "create", UA>): MRReturn<"ScheduledAction", "create">; (opts: MROpts<"ScheduledAction", "delete", UA>): MRReturn<"ScheduledAction", "delete">; (opts: MROpts<"Snapshot", "getManyForEntry", UA>): MRReturn<"Snapshot", "getManyForEntry">; (opts: MROpts<"Snapshot", "getForEntry", UA>): MRReturn<"Snapshot", "getForEntry">; (opts: MROpts<"Snapshot", "getManyForContentType", UA>): MRReturn<"Snapshot", "getManyForContentType">; (opts: MROpts<"Snapshot", "getForContentType", UA>): MRReturn<"Snapshot", "getForContentType">; (opts: MROpts<"Space", "get", UA>): MRReturn<"Space", "get">; (opts: MROpts<"Space", "getMany", UA>): MRReturn<"Space", "getMany">; (opts: MROpts<"Space", "create", UA>): MRReturn<"Space", "create">; (opts: MROpts<"Space", "update", UA>): MRReturn<"Space", "update">; (opts: MROpts<"Space", "delete", UA>): MRReturn<"Space", "delete">; (opts: MROpts<"SpaceMember", "get", UA>): MRReturn<"SpaceMember", "get">; (opts: MROpts<"SpaceMember", "getMany", UA>): MRReturn<"SpaceMember", "getMany">; (opts: MROpts<"SpaceMembership", "get", UA>): MRReturn<"SpaceMembership", "get">; (opts: MROpts<"SpaceMembership", "getMany", UA>): MRReturn<"SpaceMembership", "getMany">; (opts: MROpts<"SpaceMembership", "getForOrganization", UA>): MRReturn<"SpaceMembership", "getForOrganization">; (opts: MROpts<"SpaceMembership", "getManyForOrganization", UA>): MRReturn<"SpaceMembership", "getManyForOrganization">; (opts: MROpts<"SpaceMembership", "create", UA>): MRReturn<"SpaceMembership", "create">; (opts: MROpts<"SpaceMembership", "createWithId", UA>): MRReturn<"SpaceMembership", "createWithId">; (opts: MROpts<"SpaceMembership", "update", UA>): MRReturn<"SpaceMembership", "update">; (opts: MROpts<"SpaceMembership", "delete", UA>): MRReturn<"SpaceMembership", "delete">; (opts: MROpts<"Tag", "get", UA>): MRReturn<"Tag", "get">; (opts: MROpts<"Tag", "getMany", UA>): MRReturn<"Tag", "getMany">; (opts: MROpts<"Tag", "createWithId", UA>): MRReturn<"Tag", "createWithId">; (opts: MROpts<"Tag", "update", UA>): MRReturn<"Tag", "update">; (opts: MROpts<"Tag", "delete", UA>): MRReturn<"Tag", "delete">; (opts: MROpts<"Team", "get", UA>): MRReturn<"Team", "get">; (opts: MROpts<"Team", "getMany", UA>): MRReturn<"Team", "getMany">; (opts: MROpts<"Team", "create", UA>): MRReturn<"Team", "create">; (opts: MROpts<"Team", "update", UA>): MRReturn<"Team", "update">; (opts: MROpts<"Team", "delete", UA>): MRReturn<"Team", "delete">; (opts: MROpts<"TeamMembership", "get", UA>): MRReturn<"TeamMembership", "get">; (opts: MROpts<"TeamMembership", "getManyForOrganization", UA>): MRReturn<"TeamMembership", "getManyForOrganization">; (opts: MROpts<"TeamMembership", "getManyForTeam", UA>): MRReturn<"TeamMembership", "getManyForTeam">; (opts: MROpts<"TeamMembership", "create", UA>): MRReturn<"TeamMembership", "create">; (opts: MROpts<"TeamMembership", "update", UA>): MRReturn<"TeamMembership", "update">; (opts: MROpts<"TeamMembership", "delete", UA>): MRReturn<"TeamMembership", "delete">; (opts: MROpts<"TeamSpaceMembership", "get", UA>): MRReturn<"TeamSpaceMembership", "get">; (opts: MROpts<"TeamSpaceMembership", "getMany", UA>): MRReturn<"TeamSpaceMembership", "getMany">; (opts: MROpts<"TeamSpaceMembership", "getForOrganization", UA>): MRReturn<"TeamSpaceMembership", "getForOrganization">; (opts: MROpts<"TeamSpaceMembership", "getManyForOrganization", UA>): MRReturn<"TeamSpaceMembership", "getManyForOrganization">; (opts: MROpts<"TeamSpaceMembership", "create", UA>): MRReturn<"TeamSpaceMembership", "create">; (opts: MROpts<"TeamSpaceMembership", "update", UA>): MRReturn<"TeamSpaceMembership", "update">; (opts: MROpts<"TeamSpaceMembership", "delete", UA>): MRReturn<"TeamSpaceMembership", "delete">; (opts: MROpts<"Upload", "get", UA>): MRReturn<"Entry", "get">; (opts: MROpts<"Upload", "create", UA>): MRReturn<"Entry", "create">; (opts: MROpts<"Upload", "delete", UA>): MRReturn<"Entry", "delete">; (opts: MROpts<"Usage", "getManyForSpace", UA>): MRReturn<"Usage", "getManyForSpace">; (opts: MROpts<"Usage", "getManyForOrganization", UA>): MRReturn<"Usage", "getManyForOrganization">; (opts: MROpts<"User", "getManyForSpace", UA>): MRReturn<"User", "getManyForSpace">; (opts: MROpts<"User", "getForSpace", UA>): MRReturn<"User", "getForSpace">; (opts: MROpts<"User", "getCurrent", UA>): MRReturn<"User", "getCurrent">; (opts: MROpts<"User", "getForOrganization", UA>): MRReturn<"User", "getForOrganization">; (opts: MROpts<"User", "getManyForOrganization", UA>): MRReturn<"User", "getManyForOrganization">; (opts: MROpts<"Webhook", "get", UA>): MRReturn<"Webhook", "get">; (opts: MROpts<"Webhook", "getMany", UA>): MRReturn<"Webhook", "getMany">; (opts: MROpts<"Webhook", "getCallDetails", UA>): MRReturn<"Webhook", "getCallDetails">; (opts: MROpts<"Webhook", "getHealthStatus", UA>): MRReturn<"Webhook", "getHealthStatus">; (opts: MROpts<"Webhook", "getManyCallDetails", UA>): MRReturn<"Webhook", "getManyCallDetails">; (opts: MROpts<"Webhook", "create", UA>): MRReturn<"Webhook", "create">; (opts: MROpts<"Webhook", "createWithId", UA>): MRReturn<"Webhook", "createWithId">; (opts: MROpts<"Webhook", "update", UA>): MRReturn<"Webhook", "update">; (opts: MROpts<"Webhook", "delete", UA>): MRReturn<"Webhook", "delete"> }

Type parameters

  • UA: boolean

Type declaration

    • (opts: MROpts<"Http", "get", UA>): MRReturn<"Http", "get">
    • (opts: MROpts<"Http", "post", UA>): MRReturn<"Http", "post">
    • (opts: MROpts<"Http", "put", UA>): MRReturn<"Http", "put">
    • (opts: MROpts<"Http", "delete", UA>): MRReturn<"Http", "delete">
    • (opts: MROpts<"Http", "request", UA>): MRReturn<"Http", "request">
    • (opts: MROpts<"AppBundle", "get", UA>): MRReturn<"AppBundle", "get">
    • (opts: MROpts<"AppBundle", "getMany", UA>): MRReturn<"AppBundle", "getMany">
    • (opts: MROpts<"AppBundle", "delete", UA>): MRReturn<"AppBundle", "delete">
    • (opts: MROpts<"AppBundle", "create", UA>): MRReturn<"AppBundle", "create">
    • (opts: MROpts<"ApiKey", "get", UA>): MRReturn<"ApiKey", "get">
    • (opts: MROpts<"ApiKey", "getMany", UA>): MRReturn<"ApiKey", "getMany">
    • (opts: MROpts<"ApiKey", "create", UA>): MRReturn<"ApiKey", "create">
    • (opts: MROpts<"ApiKey", "createWithId", UA>): MRReturn<"ApiKey", "createWithId">
    • (opts: MROpts<"ApiKey", "update", UA>): MRReturn<"ApiKey", "update">
    • (opts: MROpts<"ApiKey", "delete", UA>): MRReturn<"ApiKey", "delete">
    • (opts: MROpts<"AppDefinition", "get", UA>): MRReturn<"AppDefinition", "get">
    • (opts: MROpts<"AppDefinition", "getMany", UA>): MRReturn<"AppDefinition", "getMany">
    • (opts: MROpts<"AppDefinition", "create", UA>): MRReturn<"AppDefinition", "create">
    • (opts: MROpts<"AppDefinition", "update", UA>): MRReturn<"AppDefinition", "update">
    • (opts: MROpts<"AppDefinition", "delete", UA>): MRReturn<"AppDefinition", "delete">
    • (opts: MROpts<"AppInstallation", "get", UA>): MRReturn<"AppInstallation", "get">
    • (opts: MROpts<"AppInstallation", "getMany", UA>): MRReturn<"AppInstallation", "getMany">
    • (opts: MROpts<"AppInstallation", "upsert", UA>): MRReturn<"AppInstallation", "upsert">
    • (opts: MROpts<"AppInstallation", "delete", UA>): MRReturn<"AppInstallation", "delete">
    • (opts: MROpts<"Asset", "getMany", UA>): MRReturn<"Asset", "getMany">
    • (opts: MROpts<"Asset", "get", UA>): MRReturn<"Asset", "get">
    • (opts: MROpts<"Asset", "update", UA>): MRReturn<"Asset", "update">
    • (opts: MROpts<"Asset", "delete", UA>): MRReturn<"Asset", "delete">
    • (opts: MROpts<"Asset", "publish", UA>): MRReturn<"Asset", "publish">
    • (opts: MROpts<"Asset", "unpublish", UA>): MRReturn<"Asset", "unpublish">
    • (opts: MROpts<"Asset", "archive", UA>): MRReturn<"Asset", "archive">
    • (opts: MROpts<"Asset", "unarchive", UA>): MRReturn<"Asset", "unarchive">
    • (opts: MROpts<"Asset", "create", UA>): MRReturn<"Asset", "create">
    • (opts: MROpts<"Asset", "createWithId", UA>): MRReturn<"Asset", "createWithId">
    • (opts: MROpts<"Asset", "createFromFiles", UA>): MRReturn<"Asset", "createFromFiles">
    • (opts: MROpts<"Asset", "processForAllLocales", UA>): MRReturn<"Asset", "processForAllLocales">
    • (opts: MROpts<"Asset", "processForLocale", UA>): MRReturn<"Asset", "processForLocale">
    • (opts: MROpts<"AppUpload", "get", UA>): MRReturn<"AppUpload", "get">
    • (opts: MROpts<"AppUpload", "delete", UA>): MRReturn<"AppUpload", "delete">
    • (opts: MROpts<"AppUpload", "create", UA>): MRReturn<"AppUpload", "create">
    • (opts: MROpts<"AssetKey", "create", UA>): MRReturn<"AssetKey", "create">
    • (opts: MROpts<"ContentType", "get", UA>): MRReturn<"ContentType", "get">
    • (opts: MROpts<"ContentType", "getMany", UA>): MRReturn<"ContentType", "getMany">
    • (opts: MROpts<"ContentType", "update", UA>): MRReturn<"ContentType", "update">
    • (opts: MROpts<"ContentType", "create", UA>): MRReturn<"ContentType", "create">
    • (opts: MROpts<"ContentType", "createWithId", UA>): MRReturn<"ContentType", "createWithId">
    • (opts: MROpts<"ContentType", "delete", UA>): MRReturn<"ContentType", "delete">
    • (opts: MROpts<"ContentType", "publish", UA>): MRReturn<"ContentType", "publish">
    • (opts: MROpts<"ContentType", "unpublish", UA>): MRReturn<"ContentType", "unpublish">
    • (opts: MROpts<"EditorInterface", "get", UA>): MRReturn<"EditorInterface", "get">
    • (opts: MROpts<"EditorInterface", "getMany", UA>): MRReturn<"EditorInterface", "getMany">
    • (opts: MROpts<"EditorInterface", "update", UA>): MRReturn<"EditorInterface", "update">
    • (opts: MROpts<"Environment", "get", UA>): MRReturn<"Environment", "get">
    • (opts: MROpts<"Environment", "getMany", UA>): MRReturn<"Environment", "getMany">
    • (opts: MROpts<"Environment", "create", UA>): MRReturn<"Environment", "create">
    • (opts: MROpts<"Environment", "createWithId", UA>): MRReturn<"Environment", "createWithId">
    • (opts: MROpts<"Environment", "update", UA>): MRReturn<"Environment", "update">
    • (opts: MROpts<"Environment", "delete", UA>): MRReturn<"Environment", "delete">
    • (opts: MROpts<"EnvironmentAlias", "get", UA>): MRReturn<"EnvironmentAlias", "get">
    • (opts: MROpts<"EnvironmentAlias", "getMany", UA>): MRReturn<"EnvironmentAlias", "getMany">
    • (opts: MROpts<"EnvironmentAlias", "createWithId", UA>): MRReturn<"EnvironmentAlias", "createWithId">
    • (opts: MROpts<"EnvironmentAlias", "update", UA>): MRReturn<"EnvironmentAlias", "update">
    • (opts: MROpts<"EnvironmentAlias", "delete", UA>): MRReturn<"EnvironmentAlias", "delete">
    • (opts: MROpts<"Entry", "getMany", UA>): MRReturn<"Entry", "getMany">
    • (opts: MROpts<"Entry", "get", UA>): MRReturn<"Entry", "get">
    • (opts: MROpts<"Entry", "update", UA>): MRReturn<"Entry", "update">
    • (opts: MROpts<"Entry", "delete", UA>): MRReturn<"Entry", "delete">
    • (opts: MROpts<"Entry", "publish", UA>): MRReturn<"Entry", "publish">
    • (opts: MROpts<"Entry", "unpublish", UA>): MRReturn<"Entry", "unpublish">
    • (opts: MROpts<"Entry", "archive", UA>): MRReturn<"Entry", "archive">
    • (opts: MROpts<"Entry", "unarchive", UA>): MRReturn<"Entry", "unarchive">
    • (opts: MROpts<"Entry", "create", UA>): MRReturn<"Entry", "create">
    • (opts: MROpts<"Entry", "createWithId", UA>): MRReturn<"Entry", "createWithId">
    • (opts: MROpts<"Extension", "get", UA>): MRReturn<"Extension", "get">
    • (opts: MROpts<"Extension", "getMany", UA>): MRReturn<"Extension", "getMany">
    • (opts: MROpts<"Extension", "create", UA>): MRReturn<"Extension", "create">
    • (opts: MROpts<"Extension", "createWithId", UA>): MRReturn<"Extension", "createWithId">
    • (opts: MROpts<"Extension", "update", UA>): MRReturn<"Extension", "update">
    • (opts: MROpts<"Extension", "delete", UA>): MRReturn<"Extension", "delete">
    • (opts: MROpts<"Locale", "get", UA>): MRReturn<"Locale", "get">
    • (opts: MROpts<"Locale", "getMany", UA>): MRReturn<"Locale", "getMany">
    • (opts: MROpts<"Locale", "delete", UA>): MRReturn<"Locale", "delete">
    • (opts: MROpts<"Locale", "update", UA>): MRReturn<"Locale", "update">
    • (opts: MROpts<"Locale", "create", UA>): MRReturn<"Locale", "create">
    • (opts: MROpts<"Organization", "getMany", UA>): MRReturn<"Organization", "getMany">
    • (opts: MROpts<"Organization", "get", UA>): MRReturn<"Organization", "get">
    • (opts: MROpts<"OrganizationInvitation", "get", UA>): MRReturn<"OrganizationInvitation", "get">
    • (opts: MROpts<"OrganizationInvitation", "create", UA>): MRReturn<"OrganizationInvitation", "create">
    • (opts: MROpts<"OrganizationMembership", "get", UA>): MRReturn<"OrganizationMembership", "get">
    • (opts: MROpts<"OrganizationMembership", "getMany", UA>): MRReturn<"OrganizationMembership", "getMany">
    • (opts: MROpts<"OrganizationMembership", "update", UA>): MRReturn<"OrganizationMembership", "update">
    • (opts: MROpts<"OrganizationMembership", "delete", UA>): MRReturn<"OrganizationMembership", "delete">
    • (opts: MROpts<"PersonalAccessToken", "get", UA>): MRReturn<"PersonalAccessToken", "get">
    • (opts: MROpts<"PersonalAccessToken", "getMany", UA>): MRReturn<"PersonalAccessToken", "getMany">
    • (opts: MROpts<"PersonalAccessToken", "create", UA>): MRReturn<"PersonalAccessToken", "create">
    • (opts: MROpts<"PersonalAccessToken", "revoke", UA>): MRReturn<"PersonalAccessToken", "revoke">
    • (opts: MROpts<"PreviewApiKey", "get", UA>): MRReturn<"PreviewApiKey", "get">
    • (opts: MROpts<"PreviewApiKey", "getMany", UA>): MRReturn<"PreviewApiKey", "getMany">
    • (opts: MROpts<"Role", "get", UA>): MRReturn<"Role", "get">
    • (opts: MROpts<"Role", "getMany", UA>): MRReturn<"Role", "getMany">
    • (opts: MROpts<"Role", "create", UA>): MRReturn<"Role", "create">
    • (opts: MROpts<"Role", "createWithId", UA>): MRReturn<"Role", "createWithId">
    • (opts: MROpts<"Role", "update", UA>): MRReturn<"Role", "update">
    • (opts: MROpts<"Role", "delete", UA>): MRReturn<"Role", "delete">
    • (opts: MROpts<"ScheduledAction", "getMany", UA>): MRReturn<"ScheduledAction", "getMany">
    • (opts: MROpts<"ScheduledAction", "create", UA>): MRReturn<"ScheduledAction", "create">
    • (opts: MROpts<"ScheduledAction", "delete", UA>): MRReturn<"ScheduledAction", "delete">
    • (opts: MROpts<"Snapshot", "getManyForEntry", UA>): MRReturn<"Snapshot", "getManyForEntry">
    • (opts: MROpts<"Snapshot", "getForEntry", UA>): MRReturn<"Snapshot", "getForEntry">
    • (opts: MROpts<"Snapshot", "getManyForContentType", UA>): MRReturn<"Snapshot", "getManyForContentType">
    • (opts: MROpts<"Snapshot", "getForContentType", UA>): MRReturn<"Snapshot", "getForContentType">
    • (opts: MROpts<"Space", "get", UA>): MRReturn<"Space", "get">
    • (opts: MROpts<"Space", "getMany", UA>): MRReturn<"Space", "getMany">
    • (opts: MROpts<"Space", "create", UA>): MRReturn<"Space", "create">
    • (opts: MROpts<"Space", "update", UA>): MRReturn<"Space", "update">
    • (opts: MROpts<"Space", "delete", UA>): MRReturn<"Space", "delete">
    • (opts: MROpts<"SpaceMember", "get", UA>): MRReturn<"SpaceMember", "get">
    • (opts: MROpts<"SpaceMember", "getMany", UA>): MRReturn<"SpaceMember", "getMany">
    • (opts: MROpts<"SpaceMembership", "get", UA>): MRReturn<"SpaceMembership", "get">
    • (opts: MROpts<"SpaceMembership", "getMany", UA>): MRReturn<"SpaceMembership", "getMany">
    • (opts: MROpts<"SpaceMembership", "getForOrganization", UA>): MRReturn<"SpaceMembership", "getForOrganization">
    • (opts: MROpts<"SpaceMembership", "getManyForOrganization", UA>): MRReturn<"SpaceMembership", "getManyForOrganization">
    • (opts: MROpts<"SpaceMembership", "create", UA>): MRReturn<"SpaceMembership", "create">
    • (opts: MROpts<"SpaceMembership", "createWithId", UA>): MRReturn<"SpaceMembership", "createWithId">
    • (opts: MROpts<"SpaceMembership", "update", UA>): MRReturn<"SpaceMembership", "update">
    • (opts: MROpts<"SpaceMembership", "delete", UA>): MRReturn<"SpaceMembership", "delete">
    • (opts: MROpts<"Tag", "get", UA>): MRReturn<"Tag", "get">
    • (opts: MROpts<"Tag", "getMany", UA>): MRReturn<"Tag", "getMany">
    • (opts: MROpts<"Tag", "createWithId", UA>): MRReturn<"Tag", "createWithId">
    • (opts: MROpts<"Tag", "update", UA>): MRReturn<"Tag", "update">
    • (opts: MROpts<"Tag", "delete", UA>): MRReturn<"Tag", "delete">
    • (opts: MROpts<"Team", "get", UA>): MRReturn<"Team", "get">
    • (opts: MROpts<"Team", "getMany", UA>): MRReturn<"Team", "getMany">
    • (opts: MROpts<"Team", "create", UA>): MRReturn<"Team", "create">
    • (opts: MROpts<"Team", "update", UA>): MRReturn<"Team", "update">
    • (opts: MROpts<"Team", "delete", UA>): MRReturn<"Team", "delete">
    • (opts: MROpts<"TeamMembership", "get", UA>): MRReturn<"TeamMembership", "get">
    • (opts: MROpts<"TeamMembership", "getManyForOrganization", UA>): MRReturn<"TeamMembership", "getManyForOrganization">
    • (opts: MROpts<"TeamMembership", "getManyForTeam", UA>): MRReturn<"TeamMembership", "getManyForTeam">
    • (opts: MROpts<"TeamMembership", "create", UA>): MRReturn<"TeamMembership", "create">
    • (opts: MROpts<"TeamMembership", "update", UA>): MRReturn<"TeamMembership", "update">
    • (opts: MROpts<"TeamMembership", "delete", UA>): MRReturn<"TeamMembership", "delete">
    • (opts: MROpts<"TeamSpaceMembership", "get", UA>): MRReturn<"TeamSpaceMembership", "get">
    • (opts: MROpts<"TeamSpaceMembership", "getMany", UA>): MRReturn<"TeamSpaceMembership", "getMany">
    • (opts: MROpts<"TeamSpaceMembership", "getForOrganization", UA>): MRReturn<"TeamSpaceMembership", "getForOrganization">
    • (opts: MROpts<"TeamSpaceMembership", "getManyForOrganization", UA>): MRReturn<"TeamSpaceMembership", "getManyForOrganization">
    • (opts: MROpts<"TeamSpaceMembership", "create", UA>): MRReturn<"TeamSpaceMembership", "create">
    • (opts: MROpts<"TeamSpaceMembership", "update", UA>): MRReturn<"TeamSpaceMembership", "update">
    • (opts: MROpts<"TeamSpaceMembership", "delete", UA>): MRReturn<"TeamSpaceMembership", "delete">
    • (opts: MROpts<"Upload", "get", UA>): MRReturn<"Entry", "get">
    • (opts: MROpts<"Upload", "create", UA>): MRReturn<"Entry", "create">
    • (opts: MROpts<"Upload", "delete", UA>): MRReturn<"Entry", "delete">
    • (opts: MROpts<"Usage", "getManyForSpace", UA>): MRReturn<"Usage", "getManyForSpace">
    • (opts: MROpts<"Usage", "getManyForOrganization", UA>): MRReturn<"Usage", "getManyForOrganization">
    • (opts: MROpts<"User", "getManyForSpace", UA>): MRReturn<"User", "getManyForSpace">
    • (opts: MROpts<"User", "getForSpace", UA>): MRReturn<"User", "getForSpace">
    • (opts: MROpts<"User", "getCurrent", UA>): MRReturn<"User", "getCurrent">
    • (opts: MROpts<"User", "getForOrganization", UA>): MRReturn<"User", "getForOrganization">
    • (opts: MROpts<"User", "getManyForOrganization", UA>): MRReturn<"User", "getManyForOrganization">
    • (opts: MROpts<"Webhook", "get", UA>): MRReturn<"Webhook", "get">
    • (opts: MROpts<"Webhook", "getMany", UA>): MRReturn<"Webhook", "getMany">
    • (opts: MROpts<"Webhook", "getCallDetails", UA>): MRReturn<"Webhook", "getCallDetails">
    • (opts: MROpts<"Webhook", "getHealthStatus", UA>): MRReturn<"Webhook", "getHealthStatus">
    • (opts: MROpts<"Webhook", "getManyCallDetails", UA>): MRReturn<"Webhook", "getManyCallDetails">
    • (opts: MROpts<"Webhook", "create", UA>): MRReturn<"Webhook", "create">
    • (opts: MROpts<"Webhook", "createWithId", UA>): MRReturn<"Webhook", "createWithId">
    • (opts: MROpts<"Webhook", "update", UA>): MRReturn<"Webhook", "update">
    • (opts: MROpts<"Webhook", "delete", UA>): MRReturn<"Webhook", "delete">
    • Parameters

      • opts: MROpts<"Http", "get", UA>

      Returns MRReturn<"Http", "get">

    • Parameters

      • opts: MROpts<"Http", "post", UA>

      Returns MRReturn<"Http", "post">

    • Parameters

      • opts: MROpts<"Http", "put", UA>

      Returns MRReturn<"Http", "put">

    • Parameters

      • opts: MROpts<"Http", "delete", UA>

      Returns MRReturn<"Http", "delete">

    • Parameters

      • opts: MROpts<"Http", "request", UA>

      Returns MRReturn<"Http", "request">

    • Parameters

      • opts: MROpts<"AppBundle", "get", UA>

      Returns MRReturn<"AppBundle", "get">

    • Parameters

      • opts: MROpts<"AppBundle", "getMany", UA>

      Returns MRReturn<"AppBundle", "getMany">

    • Parameters

      • opts: MROpts<"AppBundle", "delete", UA>

      Returns MRReturn<"AppBundle", "delete">

    • Parameters

      • opts: MROpts<"AppBundle", "create", UA>

      Returns MRReturn<"AppBundle", "create">

    • Parameters

      • opts: MROpts<"ApiKey", "get", UA>

      Returns MRReturn<"ApiKey", "get">

    • Parameters

      • opts: MROpts<"ApiKey", "getMany", UA>

      Returns MRReturn<"ApiKey", "getMany">

    • Parameters

      • opts: MROpts<"ApiKey", "create", UA>

      Returns MRReturn<"ApiKey", "create">

    • Parameters

      • opts: MROpts<"ApiKey", "createWithId", UA>

      Returns MRReturn<"ApiKey", "createWithId">

    • Parameters

      • opts: MROpts<"ApiKey", "update", UA>

      Returns MRReturn<"ApiKey", "update">

    • Parameters

      • opts: MROpts<"ApiKey", "delete", UA>

      Returns MRReturn<"ApiKey", "delete">

    • Parameters

      • opts: MROpts<"AppDefinition", "get", UA>

      Returns MRReturn<"AppDefinition", "get">

    • Parameters

      • opts: MROpts<"AppDefinition", "getMany", UA>

      Returns MRReturn<"AppDefinition", "getMany">

    • Parameters

      • opts: MROpts<"AppDefinition", "create", UA>

      Returns MRReturn<"AppDefinition", "create">

    • Parameters

      • opts: MROpts<"AppDefinition", "update", UA>

      Returns MRReturn<"AppDefinition", "update">

    • Parameters

      • opts: MROpts<"AppDefinition", "delete", UA>

      Returns MRReturn<"AppDefinition", "delete">

    • Parameters

      • opts: MROpts<"AppInstallation", "get", UA>

      Returns MRReturn<"AppInstallation", "get">

    • Parameters

      • opts: MROpts<"AppInstallation", "getMany", UA>

      Returns MRReturn<"AppInstallation", "getMany">

    • Parameters

      • opts: MROpts<"AppInstallation", "upsert", UA>

      Returns MRReturn<"AppInstallation", "upsert">

    • Parameters

      • opts: MROpts<"AppInstallation", "delete", UA>

      Returns MRReturn<"AppInstallation", "delete">

    • Parameters

      • opts: MROpts<"Asset", "getMany", UA>

      Returns MRReturn<"Asset", "getMany">

    • Parameters

      • opts: MROpts<"Asset", "get", UA>

      Returns MRReturn<"Asset", "get">

    • Parameters

      • opts: MROpts<"Asset", "update", UA>

      Returns MRReturn<"Asset", "update">

    • Parameters

      • opts: MROpts<"Asset", "delete", UA>

      Returns MRReturn<"Asset", "delete">

    • Parameters

      • opts: MROpts<"Asset", "publish", UA>

      Returns MRReturn<"Asset", "publish">

    • Parameters

      • opts: MROpts<"Asset", "unpublish", UA>

      Returns MRReturn<"Asset", "unpublish">

    • Parameters

      • opts: MROpts<"Asset", "archive", UA>

      Returns MRReturn<"Asset", "archive">

    • Parameters

      • opts: MROpts<"Asset", "unarchive", UA>

      Returns MRReturn<"Asset", "unarchive">

    • Parameters

      • opts: MROpts<"Asset", "create", UA>

      Returns MRReturn<"Asset", "create">

    • Parameters

      • opts: MROpts<"Asset", "createWithId", UA>

      Returns MRReturn<"Asset", "createWithId">

    • Parameters

      • opts: MROpts<"Asset", "createFromFiles", UA>

      Returns MRReturn<"Asset", "createFromFiles">

    • Parameters

      • opts: MROpts<"Asset", "processForAllLocales", UA>

      Returns MRReturn<"Asset", "processForAllLocales">

    • Parameters

      • opts: MROpts<"Asset", "processForLocale", UA>

      Returns MRReturn<"Asset", "processForLocale">

    • Parameters

      • opts: MROpts<"AppUpload", "get", UA>

      Returns MRReturn<"AppUpload", "get">

    • Parameters

      • opts: MROpts<"AppUpload", "delete", UA>

      Returns MRReturn<"AppUpload", "delete">

    • Parameters

      • opts: MROpts<"AppUpload", "create", UA>

      Returns MRReturn<"AppUpload", "create">

    • Parameters

      • opts: MROpts<"AssetKey", "create", UA>

      Returns MRReturn<"AssetKey", "create">

    • Parameters

      • opts: MROpts<"ContentType", "get", UA>

      Returns MRReturn<"ContentType", "get">

    • Parameters

      • opts: MROpts<"ContentType", "getMany", UA>

      Returns MRReturn<"ContentType", "getMany">

    • Parameters

      • opts: MROpts<"ContentType", "update", UA>

      Returns MRReturn<"ContentType", "update">

    • Parameters

      • opts: MROpts<"ContentType", "create", UA>

      Returns MRReturn<"ContentType", "create">

    • Parameters

      • opts: MROpts<"ContentType", "createWithId", UA>

      Returns MRReturn<"ContentType", "createWithId">

    • Parameters

      • opts: MROpts<"ContentType", "delete", UA>

      Returns MRReturn<"ContentType", "delete">

    • Parameters

      • opts: MROpts<"ContentType", "publish", UA>

      Returns MRReturn<"ContentType", "publish">

    • Parameters

      • opts: MROpts<"ContentType", "unpublish", UA>

      Returns MRReturn<"ContentType", "unpublish">

    • Parameters

      • opts: MROpts<"EditorInterface", "get", UA>

      Returns MRReturn<"EditorInterface", "get">

    • Parameters

      • opts: MROpts<"EditorInterface", "getMany", UA>

      Returns MRReturn<"EditorInterface", "getMany">

    • Parameters

      • opts: MROpts<"EditorInterface", "update", UA>

      Returns MRReturn<"EditorInterface", "update">

    • Parameters

      • opts: MROpts<"Environment", "get", UA>

      Returns MRReturn<"Environment", "get">

    • Parameters

      • opts: MROpts<"Environment", "getMany", UA>

      Returns MRReturn<"Environment", "getMany">

    • Parameters

      • opts: MROpts<"Environment", "create", UA>

      Returns MRReturn<"Environment", "create">

    • Parameters

      • opts: MROpts<"Environment", "createWithId", UA>

      Returns MRReturn<"Environment", "createWithId">

    • Parameters

      • opts: MROpts<"Environment", "update", UA>

      Returns MRReturn<"Environment", "update">

    • Parameters

      • opts: MROpts<"Environment", "delete", UA>

      Returns MRReturn<"Environment", "delete">

    • Parameters

      • opts: MROpts<"EnvironmentAlias", "get", UA>

      Returns MRReturn<"EnvironmentAlias", "get">

    • Parameters

      • opts: MROpts<"EnvironmentAlias", "getMany", UA>

      Returns MRReturn<"EnvironmentAlias", "getMany">

    • Parameters

      • opts: MROpts<"EnvironmentAlias", "createWithId", UA>

      Returns MRReturn<"EnvironmentAlias", "createWithId">

    • Parameters

      • opts: MROpts<"EnvironmentAlias", "update", UA>

      Returns MRReturn<"EnvironmentAlias", "update">

    • Parameters

      • opts: MROpts<"EnvironmentAlias", "delete", UA>

      Returns MRReturn<"EnvironmentAlias", "delete">

    • Parameters

      • opts: MROpts<"Entry", "getMany", UA>

      Returns MRReturn<"Entry", "getMany">

    • Parameters

      • opts: MROpts<"Entry", "get", UA>

      Returns MRReturn<"Entry", "get">

    • Parameters

      • opts: MROpts<"Entry", "update", UA>

      Returns MRReturn<"Entry", "update">

    • Parameters

      • opts: MROpts<"Entry", "delete", UA>

      Returns MRReturn<"Entry", "delete">

    • Parameters

      • opts: MROpts<"Entry", "publish", UA>

      Returns MRReturn<"Entry", "publish">

    • Parameters

      • opts: MROpts<"Entry", "unpublish", UA>

      Returns MRReturn<"Entry", "unpublish">

    • Parameters

      • opts: MROpts<"Entry", "archive", UA>

      Returns MRReturn<"Entry", "archive">

    • Parameters

      • opts: MROpts<"Entry", "unarchive", UA>

      Returns MRReturn<"Entry", "unarchive">

    • Parameters

      • opts: MROpts<"Entry", "create", UA>

      Returns MRReturn<"Entry", "create">

    • Parameters

      • opts: MROpts<"Entry", "createWithId", UA>

      Returns MRReturn<"Entry", "createWithId">

    • Parameters

      • opts: MROpts<"Extension", "get", UA>

      Returns MRReturn<"Extension", "get">

    • Parameters

      • opts: MROpts<"Extension", "getMany", UA>

      Returns MRReturn<"Extension", "getMany">

    • Parameters

      • opts: MROpts<"Extension", "create", UA>

      Returns MRReturn<"Extension", "create">

    • Parameters

      • opts: MROpts<"Extension", "createWithId", UA>

      Returns MRReturn<"Extension", "createWithId">

    • Parameters

      • opts: MROpts<"Extension", "update", UA>

      Returns MRReturn<"Extension", "update">

    • Parameters

      • opts: MROpts<"Extension", "delete", UA>

      Returns MRReturn<"Extension", "delete">

    • Parameters

      • opts: MROpts<"Locale", "get", UA>

      Returns MRReturn<"Locale", "get">

    • Parameters

      • opts: MROpts<"Locale", "getMany", UA>

      Returns MRReturn<"Locale", "getMany">

    • Parameters

      • opts: MROpts<"Locale", "delete", UA>

      Returns MRReturn<"Locale", "delete">

    • Parameters

      • opts: MROpts<"Locale", "update", UA>

      Returns MRReturn<"Locale", "update">

    • Parameters

      • opts: MROpts<"Locale", "create", UA>

      Returns MRReturn<"Locale", "create">

    • Parameters

      • opts: MROpts<"Organization", "getMany", UA>

      Returns MRReturn<"Organization", "getMany">

    • Parameters

      • opts: MROpts<"Organization", "get", UA>

      Returns MRReturn<"Organization", "get">

    • Parameters

      • opts: MROpts<"OrganizationInvitation", "get", UA>

      Returns MRReturn<"OrganizationInvitation", "get">

    • Parameters

      • opts: MROpts<"OrganizationInvitation", "create", UA>

      Returns MRReturn<"OrganizationInvitation", "create">

    • Parameters

      • opts: MROpts<"OrganizationMembership", "get", UA>

      Returns MRReturn<"OrganizationMembership", "get">

    • Parameters

      • opts: MROpts<"OrganizationMembership", "getMany", UA>

      Returns MRReturn<"OrganizationMembership", "getMany">

    • Parameters

      • opts: MROpts<"OrganizationMembership", "update", UA>

      Returns MRReturn<"OrganizationMembership", "update">

    • Parameters

      • opts: MROpts<"OrganizationMembership", "delete", UA>

      Returns MRReturn<"OrganizationMembership", "delete">

    • Parameters

      • opts: MROpts<"PersonalAccessToken", "get", UA>

      Returns MRReturn<"PersonalAccessToken", "get">

    • Parameters

      • opts: MROpts<"PersonalAccessToken", "getMany", UA>

      Returns MRReturn<"PersonalAccessToken", "getMany">

    • Parameters

      • opts: MROpts<"PersonalAccessToken", "create", UA>

      Returns MRReturn<"PersonalAccessToken", "create">

    • Parameters

      • opts: MROpts<"PersonalAccessToken", "revoke", UA>

      Returns MRReturn<"PersonalAccessToken", "revoke">

    • Parameters

      • opts: MROpts<"PreviewApiKey", "get", UA>

      Returns MRReturn<"PreviewApiKey", "get">

    • Parameters

      • opts: MROpts<"PreviewApiKey", "getMany", UA>

      Returns MRReturn<"PreviewApiKey", "getMany">

    • Parameters

      • opts: MROpts<"Role", "get", UA>

      Returns MRReturn<"Role", "get">

    • Parameters

      • opts: MROpts<"Role", "getMany", UA>

      Returns MRReturn<"Role", "getMany">

    • Parameters

      • opts: MROpts<"Role", "create", UA>

      Returns MRReturn<"Role", "create">

    • Parameters

      • opts: MROpts<"Role", "createWithId", UA>

      Returns MRReturn<"Role", "createWithId">

    • Parameters

      • opts: MROpts<"Role", "update", UA>

      Returns MRReturn<"Role", "update">

    • Parameters

      • opts: MROpts<"Role", "delete", UA>

      Returns MRReturn<"Role", "delete">

    • Parameters

      • opts: MROpts<"ScheduledAction", "getMany", UA>

      Returns MRReturn<"ScheduledAction", "getMany">

    • Parameters

      • opts: MROpts<"ScheduledAction", "create", UA>

      Returns MRReturn<"ScheduledAction", "create">

    • Parameters

      • opts: MROpts<"ScheduledAction", "delete", UA>

      Returns MRReturn<"ScheduledAction", "delete">

    • Parameters

      • opts: MROpts<"Snapshot", "getManyForEntry", UA>

      Returns MRReturn<"Snapshot", "getManyForEntry">

    • Parameters

      • opts: MROpts<"Snapshot", "getForEntry", UA>

      Returns MRReturn<"Snapshot", "getForEntry">

    • Parameters

      • opts: MROpts<"Snapshot", "getManyForContentType", UA>

      Returns MRReturn<"Snapshot", "getManyForContentType">

    • Parameters

      • opts: MROpts<"Snapshot", "getForContentType", UA>

      Returns MRReturn<"Snapshot", "getForContentType">

    • Parameters

      • opts: MROpts<"Space", "get", UA>

      Returns MRReturn<"Space", "get">

    • Parameters

      • opts: MROpts<"Space", "getMany", UA>

      Returns MRReturn<"Space", "getMany">

    • Parameters

      • opts: MROpts<"Space", "create", UA>

      Returns MRReturn<"Space", "create">

    • Parameters

      • opts: MROpts<"Space", "update", UA>

      Returns MRReturn<"Space", "update">

    • Parameters

      • opts: MROpts<"Space", "delete", UA>

      Returns MRReturn<"Space", "delete">

    • Parameters

      • opts: MROpts<"SpaceMember", "get", UA>

      Returns MRReturn<"SpaceMember", "get">

    • Parameters

      • opts: MROpts<"SpaceMember", "getMany", UA>

      Returns MRReturn<"SpaceMember", "getMany">

    • Parameters

      • opts: MROpts<"SpaceMembership", "get", UA>

      Returns MRReturn<"SpaceMembership", "get">

    • Parameters

      • opts: MROpts<"SpaceMembership", "getMany", UA>

      Returns MRReturn<"SpaceMembership", "getMany">

    • Parameters

      • opts: MROpts<"SpaceMembership", "getForOrganization", UA>

      Returns MRReturn<"SpaceMembership", "getForOrganization">

    • Parameters

      • opts: MROpts<"SpaceMembership", "getManyForOrganization", UA>

      Returns MRReturn<"SpaceMembership", "getManyForOrganization">

    • Parameters

      • opts: MROpts<"SpaceMembership", "create", UA>

      Returns MRReturn<"SpaceMembership", "create">

    • Parameters

      • opts: MROpts<"SpaceMembership", "createWithId", UA>

      Returns MRReturn<"SpaceMembership", "createWithId">

    • Parameters

      • opts: MROpts<"SpaceMembership", "update", UA>

      Returns MRReturn<"SpaceMembership", "update">

    • Parameters

      • opts: MROpts<"SpaceMembership", "delete", UA>

      Returns MRReturn<"SpaceMembership", "delete">

    • Parameters

      • opts: MROpts<"Tag", "get", UA>

      Returns MRReturn<"Tag", "get">

    • Parameters

      • opts: MROpts<"Tag", "getMany", UA>

      Returns MRReturn<"Tag", "getMany">

    • Parameters

      • opts: MROpts<"Tag", "createWithId", UA>

      Returns MRReturn<"Tag", "createWithId">

    • Parameters

      • opts: MROpts<"Tag", "update", UA>

      Returns MRReturn<"Tag", "update">

    • Parameters

      • opts: MROpts<"Tag", "delete", UA>

      Returns MRReturn<"Tag", "delete">

    • Parameters

      • opts: MROpts<"Team", "get", UA>

      Returns MRReturn<"Team", "get">

    • Parameters

      • opts: MROpts<"Team", "getMany", UA>

      Returns MRReturn<"Team", "getMany">

    • Parameters

      • opts: MROpts<"Team", "create", UA>

      Returns MRReturn<"Team", "create">

    • Parameters

      • opts: MROpts<"Team", "update", UA>

      Returns MRReturn<"Team", "update">

    • Parameters

      • opts: MROpts<"Team", "delete", UA>

      Returns MRReturn<"Team", "delete">

    • Parameters

      • opts: MROpts<"TeamMembership", "get", UA>

      Returns MRReturn<"TeamMembership", "get">

    • Parameters

      • opts: MROpts<"TeamMembership", "getManyForOrganization", UA>

      Returns MRReturn<"TeamMembership", "getManyForOrganization">

    • Parameters

      • opts: MROpts<"TeamMembership", "getManyForTeam", UA>

      Returns MRReturn<"TeamMembership", "getManyForTeam">

    • Parameters

      • opts: MROpts<"TeamMembership", "create", UA>

      Returns MRReturn<"TeamMembership", "create">

    • Parameters

      • opts: MROpts<"TeamMembership", "update", UA>

      Returns MRReturn<"TeamMembership", "update">

    • Parameters

      • opts: MROpts<"TeamMembership", "delete", UA>

      Returns MRReturn<"TeamMembership", "delete">

    • Parameters

      • opts: MROpts<"TeamSpaceMembership", "get", UA>

      Returns MRReturn<"TeamSpaceMembership", "get">

    • Parameters

      • opts: MROpts<"TeamSpaceMembership", "getMany", UA>

      Returns MRReturn<"TeamSpaceMembership", "getMany">

    • Parameters

      • opts: MROpts<"TeamSpaceMembership", "getForOrganization", UA>

      Returns MRReturn<"TeamSpaceMembership", "getForOrganization">

    • Parameters

      • opts: MROpts<"TeamSpaceMembership", "getManyForOrganization", UA>

      Returns MRReturn<"TeamSpaceMembership", "getManyForOrganization">

    • Parameters

      • opts: MROpts<"TeamSpaceMembership", "create", UA>

      Returns MRReturn<"TeamSpaceMembership", "create">

    • Parameters

      • opts: MROpts<"TeamSpaceMembership", "update", UA>

      Returns MRReturn<"TeamSpaceMembership", "update">

    • Parameters

      • opts: MROpts<"TeamSpaceMembership", "delete", UA>

      Returns MRReturn<"TeamSpaceMembership", "delete">

    • Parameters

      • opts: MROpts<"Upload", "get", UA>

      Returns MRReturn<"Entry", "get">

    • Parameters

      • opts: MROpts<"Upload", "create", UA>

      Returns MRReturn<"Entry", "create">

    • Parameters

      • opts: MROpts<"Upload", "delete", UA>

      Returns MRReturn<"Entry", "delete">

    • Parameters

      • opts: MROpts<"Usage", "getManyForSpace", UA>

      Returns MRReturn<"Usage", "getManyForSpace">

    • Parameters

      • opts: MROpts<"Usage", "getManyForOrganization", UA>

      Returns MRReturn<"Usage", "getManyForOrganization">

    • Parameters

      • opts: MROpts<"User", "getManyForSpace", UA>

      Returns MRReturn<"User", "getManyForSpace">

    • Parameters

      • opts: MROpts<"User", "getForSpace", UA>

      Returns MRReturn<"User", "getForSpace">

    • Parameters

      • opts: MROpts<"User", "getCurrent", UA>

      Returns MRReturn<"User", "getCurrent">

    • Parameters

      • opts: MROpts<"User", "getForOrganization", UA>

      Returns MRReturn<"User", "getForOrganization">

    • Parameters

      • opts: MROpts<"User", "getManyForOrganization", UA>

      Returns MRReturn<"User", "getManyForOrganization">

    • Parameters

      • opts: MROpts<"Webhook", "get", UA>

      Returns MRReturn<"Webhook", "get">

    • Parameters

      • opts: MROpts<"Webhook", "getMany", UA>

      Returns MRReturn<"Webhook", "getMany">

    • Parameters

      • opts: MROpts<"Webhook", "getCallDetails", UA>

      Returns MRReturn<"Webhook", "getCallDetails">

    • Parameters

      • opts: MROpts<"Webhook", "getHealthStatus", UA>

      Returns MRReturn<"Webhook", "getHealthStatus">

    • Parameters

      • opts: MROpts<"Webhook", "getManyCallDetails", UA>

      Returns MRReturn<"Webhook", "getManyCallDetails">

    • Parameters

      • opts: MROpts<"Webhook", "create", UA>

      Returns MRReturn<"Webhook", "create">

    • Parameters

      • opts: MROpts<"Webhook", "createWithId", UA>

      Returns MRReturn<"Webhook", "createWithId">

    • Parameters

      • opts: MROpts<"Webhook", "update", UA>

      Returns MRReturn<"Webhook", "update">

    • Parameters

      • opts: MROpts<"Webhook", "delete", UA>

      Returns MRReturn<"Webhook", "delete">

MROpts

MROpts<ET, Action, UA>: { action: Action; entityType: ET } & UA extends true ? { userAgent: string } : {} & "params" extends keyof MRActions[ET][Action] ? undefined extends MRActions[ET][Action]["params"] ? { params?: MRActions[ET][Action]["params"] } : { params: MRActions[ET][Action]["params"] } : {} & "payload" extends keyof MRActions[ET][Action] ? undefined extends MRActions[ET][Action]["payload"] ? { payload?: MRActions[ET][Action]["payload"] } : { payload: MRActions[ET][Action]["payload"] } : {} & "headers" extends keyof MRActions[ET][Action] ? undefined extends MRActions[ET][Action]["headers"] ? { headers?: MRActions[ET][Action]["headers"] } : { headers: MRActions[ET][Action]["headers"] } : {}

Type parameters

  • ET: keyof MRActions

  • Action: keyof MRActions[ET]

  • UA: boolean = false

MRReturn

MRReturn<ET, Action>: "return" extends keyof MRActions[ET][Action] ? Promise<MRActions[ET][Action]["return"]> : never

Type parameters

  • ET: keyof MRActions

  • Action: keyof MRActions[ET]

MakeRequest

MakeRequest: MRInternal<false>

MakeRequestWithUserAgent

MakeRequestWithUserAgent: MRInternal<true>

OmitOrDelete

OmitOrDelete: "omitted" | "deleted"

OptionalDefaults

OptionalDefaults<T>: Omit<T, keyof DefaultParams> & "organizationId" extends keyof T ? { organizationId?: undefined | string } : {} & "spaceId" extends keyof T ? { spaceId?: undefined | string } : {} & "environmentId" extends keyof T ? { environmentId?: undefined | string } : {}

Type parameters

  • T

Organization

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

ParameterOption

ParameterOption: string | {}

ParameterType

ParameterType: "Boolean" | "Symbol" | "Number" | "Enum"

ParamsType

ParamsType<T>: T extends (params: infer P) => any ? P : never

Type parameters

PersonalAccessTokenProp

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

Type declaration

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

PlainClientAPI

PlainClientAPI: { apiKey: { create: any; createWithId: any; delete: any; get: any; getMany: any; update: any }; appBundle: { create: any; delete: any; get: any; getMany: any }; appDefinition: { create: any; delete: any; get: any; getMany: any; update: any }; appInstallation: { delete: any; get: any; getMany: 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 }; contentType: { 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; publish: 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; post: any; put: any }; role: { create: any; createWithId: any; delete: any; get: any; getMany: any; update: any }; scheduledActions: { create: any; delete: any; getMany: 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 }; team: { create: any; delete: any; get: any; getMany: 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: { description: string; name: string; sys: MetaSysProps }

Type declaration

QueryParams

QueryParams: { query?: QueryOptions }

Type declaration

RestAdapterParams

RestAdapterParams: CreateHttpClientParams & { accessToken: CreateHttpClientParams["accessToken"]; host?: undefined | string; hostUpload?: undefined | string }

RestEndpoint

RestEndpoint<ET, Action, Params, Payload, Headers, Return>: Params extends undefined ? (http: AxiosInstance) => Return : Payload extends undefined ? (http: AxiosInstance, params: Params) => Return : Headers extends undefined ? (http: AxiosInstance, params: Params, payload: Payload) => Return : (http: AxiosInstance, params: Params, payload: Payload, headers: Headers) => Return

Type parameters

  • ET: keyof MRActions

  • Action: keyof MRActions[ET]

  • Params = "params" extends keyof MROpts<ET, Action, false> ? MROpts<ET, Action, false>["params"] : undefined

  • Payload = "payload" extends keyof MROpts<ET, Action, false> ? MROpts<ET, Action, false>["payload"] : undefined

  • Headers = "headers" extends keyof MROpts<ET, Action, false> ? MROpts<ET, Action, false>["headers"] : undefined

  • Return = MRReturn<ET, Action>

RoleProps

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

Type declaration

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

    Permissions for application sections

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

SchedulableActionType

SchedulableActionType: "publish" | "unpublish"

SchedulableEntityType

SchedulableEntityType: "Entry" | "Asset" | "Release"

ScheduledActionApi

ScheduledActionApi: { delete: any }

Type declaration

ScheduledActionProps

ScheduledActionProps: { action: SchedulableActionType; entity: Link<SchedulableEntityType>; environment?: undefined | { sys: MetaLinkProps }; scheduledFor: { datetime: ISO8601Timestamp }; sys: ScheduledActionSysProps }

Type declaration

ScheduledActionSysProps

ScheduledActionSysProps: { canceledAt?: ISO8601Timestamp; canceledBy?: undefined | { sys: MetaLinkProps }; createdAt: ISO8601Timestamp; createdBy: { sys: MetaLinkProps }; id: string; space: { sys: MetaLinkProps }; status: ScheduledActionStatus; type: "ScheduledAction" }

Type declaration

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

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

TagApi

TagApi: { delete: any; update: any }

Type declaration

TagCollectionProps

TagCollectionProps: { items: TagProps[]; sys: { type: "Array" }; total: number }

Type declaration

  • items: TagProps[]
  • sys: { type: "Array" }
    • type: "Array"
  • total: number

TagProps

TagProps: { name: string; sys: TagSysProps }

Type declaration

TagSysProps

TagSysProps: Pick<MetaSysProps, "id" | "version" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy"> & { environment: SysLink; space: SysLink; type: "Tag"; visibility: TagVisibility }

TagVisibility

TagVisibility: "private" | "public"

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

UpdateWebhookProps

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

UploadProps

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

Type declaration

UsageMetricEnum

UsageMetricEnum: "cda" | "cma" | "cpa" | "gql"

UsageProps

UsageProps: { dateRange: { endAt: string; startAt: string }; metric: UsageMetricEnum; sys: MetaSysProps & { organization?: undefined | { 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?: undefined | { 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

WebhookCallDetailsProps

WebhookCallDetailsProps: { errors: any[]; eventType: string; request: WebhookCallRequest; requestAt: string; response: WebhookCallResponse; responseAt: string; statusCode: number; sys: WebhookCallDetailsSys; url: string }

Type declaration

  • errors: any[]

    Errors

  • eventType: string

    Type of the webhook

  • request: WebhookCallRequest

    Request object

  • requestAt: string

    Timestamp of the request

  • response: WebhookCallResponse

    Request object

  • responseAt: string

    Timestamp of the response

  • statusCode: number

    Status code of the request

  • sys: WebhookCallDetailsSys

    System metadata

  • url: string

    Url of the request

WebhookCallDetailsSys

WebhookCallDetailsSys: Except<BasicMetaSysProps, "version" | "updatedAt" | "updatedBy">

WebhookCallOverviewProps

WebhookCallOverviewProps: Except<WebhookCallDetailsProps, "request" | "response">

WebhookCallRequest

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

Type declaration

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

WebhookCallResponse

WebhookCallResponse: WebhookCallRequest & { statusCode: number }

WebhookCalls

WebhookCalls: { healthy: number; total: number }

Type declaration

  • healthy: number
  • total: number

WebhookFilter

WebhookHeader

WebhookHeader: { key: string; secret?: undefined | false | true; value: string }

Type declaration

  • key: string
  • Optional secret?: undefined | false | true
  • value: string

WebhookHealthProps

WebhookHealthProps: { calls: WebhookCalls; sys: WebhookHealthSys & { space: { sys: MetaLinkProps } } }

Type declaration

WebhookHealthSys

WebhookHealthSys: Except<BasicMetaSysProps, "version" | "updatedAt" | "updatedBy" | "createdAt">

WebhookProps

WebhookProps: { filters?: WebhookFilter[]; headers: Array<WebhookHeader>; httpBasicPassword?: undefined | string; httpBasicUsername?: undefined | string; name: string; sys: BasicMetaSysProps & { space: SysLink }; topics: string[]; transformation?: WebhookTransformation; url: string }

Type declaration

  • Optional filters?: WebhookFilter[]

    Webhook filters

  • headers: Array<WebhookHeader>

    Headers that should be appended to the webhook request

  • Optional httpBasicPassword?: undefined | string

    Password for basic http auth

  • Optional httpBasicUsername?: undefined | 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"

WrapFn

WrapFn<ET, Action, Params, Payload, Headers, Return>: Params extends undefined ? () => Return : Payload extends undefined ? (params: Params) => Return : Headers extends undefined ? (params: Params, payload: Payload) => Return : (params: Params, payload: Payload, headers: Headers) => Return

Type parameters

  • ET: keyof MRActions

  • Action: keyof MRActions[ET]

  • Params = "params" extends keyof MRActions[ET][Action] ? MRActions[ET][Action]["params"] : undefined

  • Payload = "payload" extends keyof MRActions[ET][Action] ? MRActions[ET][Action]["payload"] : undefined

  • Headers = "headers" extends keyof MRActions[ET][Action] ? MRActions[ET][Action]["headers"] : undefined

  • Return = MRReturn<ET, Action>

WrapParams

WrapParams: { defaults?: DefaultParams; makeRequest: MakeRequest }

Type declaration

Variables

Const ASSET_KEY_MAX_LIFETIME

ASSET_KEY_MAX_LIFETIME: number = 48 * 60 * 60

Const ASSET_PROCESSING_CHECK_RETRIES

ASSET_PROCESSING_CHECK_RETRIES: 10 = 10

Const ASSET_PROCESSING_CHECK_WAIT

ASSET_PROCESSING_CHECK_WAIT: 3000 = 3000

Asset processing

Const wrapScheduledActionCollection

wrapScheduledActionCollection: (Anonymous function) = wrapCollection(wrapScheduledAction)

Const wrapTagCollection

wrapTagCollection: (Anonymous function) = wrapCollection(wrapTag)

Functions

Const archive

Const asIterator

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

checkIfAssetHasUrl

  • checkIfAssetHasUrl(http: AxiosInstance, params: GetSpaceEnvironmentParams & { assetId: string }, __namedParameters: { checkCount: number; locale: string; processingCheckRetries: number; processingCheckWait: number; reject: (err: Error) => unknown; resolve: (asset: AssetProps) => unknown }): Promise<void>
  • Parameters

    • http: AxiosInstance
    • params: GetSpaceEnvironmentParams & { assetId: string }
    • __namedParameters: { checkCount: number; locale: string; processingCheckRetries: number; processingCheckWait: number; reject: (err: Error) => unknown; resolve: (asset: AssetProps) => unknown }
      • checkCount: number
      • locale: string
      • processingCheckRetries: number
      • processingCheckWait: number
      • reject: (err: Error) => unknown
          • Parameters

            Returns unknown

      • resolve: (asset: AssetProps) => unknown

    Returns Promise<void>

Const create

createApiKeyApi

  • createApiKeyApi(makeRequest: MakeRequest): { delete: any; update: any }

createAppBundleApi

  • createAppBundleApi(makeRequest: MakeRequest): { delete: any }

createAppDefinitionApi

  • createAppDefinitionApi(makeRequest: MakeRequest): { createAppBundle: any; delete: any; getAppBundle: any; getAppBundles: any; update: any }
  • Parameters

    Returns { createAppBundle: any; delete: any; getAppBundle: any; getAppBundles: any; update: any }

    • createAppBundle: function
      • Creates an app bundle

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        client.getOrganization('<org_id>')
        .then((org) => org.getAppDefinition('<app_def_id>'))
        .then((appDefinition) => appDefinition.createAppBundle('<app_upload_id>')
        .then((appBundle) => console.log(appBundle))
        .catch(console.error)

        Parameters

        Returns Promise<AppBundle>

        Promise for the newly created AppBundle

    • delete: function
      • delete(): Promise<any>
      • Deletes this object on the server.

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.getAppDefinition('<app_def_id>'))
        .then((appDefinition) => appDefinition.delete())
        .then(() => console.log(`App Definition deleted.`))
        .catch(console.error)

        Returns Promise<any>

        Promise for the deletion. It contains no data, but the Promise error case should be handled.

    • getAppBundle: function
      • getAppBundle(id: string): Promise<AppBundle>
      • Gets an app bundle

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.getAppDefinition('<app_def_id>'))
        .then((appDefinition) => appDefinition.getAppBundle('<app_upload_id>')
        .then((appBundle) => console.log(appBundle))
        .catch(console.error)

        Parameters

        • id: string

          AppBundle ID

        Returns Promise<AppBundle>

        Promise for an AppBundle

    • getAppBundles: function
      • Gets a collection of AppBundles

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.getAppDefinition('<app_def_id>'))
        .then((appDefinition) => appDefinition.getAppBundles()
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<AppBundle, AppBundleProps>>

        Promise for a collection of AppBundles

    • update: function
      • Sends an update to the server with any changes made to the object's properties

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.getAppDefinition('<app_def_id>'))
        .then((appDefinition) => {
          appDefinition.name = 'New App Definition name'
          return appDefinition.update()
        })
        .then((appDefinition) => console.log(`App Definition ${appDefinition.sys.id} updated.`))
        .catch(console.error)

        Returns Promise<AppDefinition>

        Object returned from the server with updated changes.

createAppInstallationApi

  • createAppInstallationApi(makeRequest: MakeRequest): { delete: any; update: any }

createAppUploadApi

  • createAppUploadApi(makeRequest: MakeRequest): { delete: any }

createAssetApi

createClient

createClientApi

  • createClientApi(makeRequest: MakeRequest): { createPersonalAccessToken: any; createSpace: any; getCurrentUser: any; getOrganization: any; getOrganizationUsage: any; getOrganizations: any; getPersonalAccessToken: any; getPersonalAccessTokens: any; getSpace: any; getSpaceUsage: any; getSpaces: any; rawRequest: any }
  • Parameters

    Returns { createPersonalAccessToken: any; createSpace: any; getCurrentUser: any; getOrganization: any; getOrganizationUsage: any; getOrganizations: any; getPersonalAccessToken: any; getPersonalAccessTokens: any; getSpace: any; getSpaceUsage: any; getSpaces: any; rawRequest: any }

    • createPersonalAccessToken: function
      • Creates a personal access token

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.createPersonalAccessToken(
         {
           "name": "My Token",
           "scope": [
             "content_management_manage"
           ]
         }
        )
        .then(personalAccessToken => console.log(personalAccessToken.token))
        .catch(console.error)

        Parameters

        Returns Promise<PersonalAccessToken>

        Promise for a Token

    • createSpace: function
      • createSpace(spaceData: Omit<SpaceProps, "sys">, organizationId: string): Promise<Space>
      • Creates a space

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.createSpace({
          name: 'Name of new space'
        })
        .then((space) => console.log(space))
        .catch(console.error)

        Parameters

        • spaceData: Omit<SpaceProps, "sys">

          Object representation of the Space to be created

        • organizationId: string

          Organization ID, if the associated token can manage more than one organization.

        Returns Promise<Space>

        Promise for the newly created Space

    • getCurrentUser: function
      • Gets the authenticated user

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getCurrentUser()
        .then(user => console.log(user.firstName))
        .catch(console.error)

        Type parameters

        • T = UserProps

        Parameters

        Returns Promise<T>

        Promise for a User

    • getOrganization: function
      • Gets an organization

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => console.log(org))
        .catch(console.error)

        Parameters

        • id: string

          Organization ID

        Returns Promise<Organization>

        Promise for a Organization

    • getOrganizationUsage: function
      • Get organization usage grouped by metric

        example
        
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganizationUsage('<organizationId>', {
           'metric[in]': 'cma,gql',
           'dateRange.startAt': '2019-10-22',
           'dateRange.endAt': '2019-11-10'
           }
        })
        .then(result => console.log(result.items))
        .catch(console.error)

        Parameters

        • organizationId: string

          Id of an organization

        • Default value query: QueryOptions = {}

          Query parameters

        Returns Promise<Collection<Usage, UsageProps>>

        Promise of a collection of usages

    • getOrganizations: function
      • Gets a collection of Organizations

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganizations()
        .then(result => console.log(result.items))
        .catch(console.error)

        Returns Promise<Collection<Organization, OrganizationProp>>

        Promise for a collection of Organizations

    • getPersonalAccessToken: function
      • Gets a personal access token

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getPersonalAccessToken(tokenId)
        .then(token => console.log(token.token))
        .catch(console.error)

        Parameters

        • tokenId: string

        Returns Promise<PersonalAccessToken>

        Promise for a Token

    • getPersonalAccessTokens: function
      • Gets all personal access tokens

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getPersonalAccessTokens()
        .then(response => console.log(reponse.items))
        .catch(console.error)

        Returns Promise<Collection<PersonalAccessToken, PersonalAccessTokenProp>>

        Promise for a Token

    • getSpace: function
      • getSpace(spaceId: string): Promise<Space>
      • Gets a space

        Parameters

        • spaceId: string

          Space ID

        Returns Promise<Space>

        Promise for a Space

        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => console.log(space))
        .catch(console.error)
    • getSpaceUsage: function
      • Get organization usage grouped by space and metric

        Parameters

        • organizationId: string

          Id of an organization

        • Default value query: UsageQuery = {}

          Query parameters

        Returns Promise<Collection<Usage, UsageProps>>

        Promise of a collection of usages

        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpaceUsage('<organizationId>', {
           skip: 0,
           limit: 10,
           'metric[in]': 'cda,cpa,gql',
           'dateRange.startAt': '2019-10-22',
           'dateRange.endAt': '2020-11-30'
           }
        })
        .then(result => console.log(result.items))
        .catch(console.error)
    • getSpaces: function
      • Gets all spaces

        Parameters

        Returns Promise<Collection<Space, SpaceProps>>

        Promise for a collection of Spaces

        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpaces()
        .then((response) => console.log(response.items))
        .catch(console.error)
    • rawRequest: function
      • rawRequest(__namedParameters: { config: config; url: string }): Promise<any>
      • Make a custom request to the Contentful management API's /spaces endpoint

        Parameters

        • __namedParameters: { config: config; url: string }

        Returns Promise<any>

        Promise for the response data

        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.rawRequest({
          method: 'GET',
          url: '/custom/path'
        })
        .then((responseData) => console.log(responseData))
        .catch(console.error)

createContentTypeApi

createDeleteScheduledAction

createEditorInterfaceApi

  • createEditorInterfaceApi(makeRequest: MakeRequest): { getControlForField: any; update: any }

createEntryApi

createEnvironmentAliasApi

  • createEnvironmentAliasApi(makeRequest: MakeRequest): { delete: any; update: any }

createEnvironmentApi

  • createEnvironmentApi(makeRequest: MakeRequest): { createAppInstallation: any; createAsset: any; createAssetFromFiles: any; createAssetKey: any; createAssetWithId: any; createContentType: any; createContentTypeWithId: any; createEntry: any; createEntryWithId: any; createLocale: any; createTag: any; createUiExtension: any; createUiExtensionWithId: any; createUpload: any; delete: any; deleteEntry: any; getAppInstallation: any; getAppInstallations: any; getAsset: any; getAssetFromData: any; getAssets: any; getContentType: any; getContentTypeSnapshots: any; getContentTypes: any; getEditorInterfaceForContentType: any; getEditorInterfaces: any; getEntries: any; getEntry: any; getEntryFromData: any; getEntrySnapshots: any; getLocale: any; getLocales: any; getTag: any; getTags: any; getUiExtension: any; getUiExtensions: any; getUpload: any; update: any }
  • Creates API object with methods to access the Environment API

    Parameters

    • makeRequest: MakeRequest

      function to make requests via an adapter

    Returns { createAppInstallation: any; createAsset: any; createAssetFromFiles: any; createAssetKey: any; createAssetWithId: any; createContentType: any; createContentTypeWithId: any; createEntry: any; createEntryWithId: any; createLocale: any; createTag: any; createUiExtension: any; createUiExtensionWithId: any; createUpload: any; delete: any; deleteEntry: any; getAppInstallation: any; getAppInstallations: any; getAsset: any; getAssetFromData: any; getAssets: any; getContentType: any; getContentTypeSnapshots: any; getContentTypes: any; getEditorInterfaceForContentType: any; getEditorInterfaces: any; getEntries: any; getEntry: any; getEntryFromData: any; getEntrySnapshots: any; getLocale: any; getLocales: any; getTag: any; getTags: any; getUiExtension: any; getUiExtensions: any; getUpload: any; update: any }

    • createAppInstallation: function
      • Gets an App Installation

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
         .then((space) => space.getEnvironment('<environment-id>'))
         .then((environment) => environment.createAppInstallation('<app_definition_id>', {
           parameters: {
             someParameter: someValue
           }
          })
         .then((appInstallation) => console.log(appInstallation))
         .catch(console.error)

        Parameters

        Returns Promise<AppInstallation>

        Promise for an App Installation

    • createAsset: function
      • Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.

        example
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        // Create asset
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createAsset({
          fields: {
            title: {
              'en-US': 'Playsam Streamliner'
           },
           file: {
              'en-US': {
                contentType: 'image/jpeg',
               fileName: 'example.jpeg',
               upload: 'https://example.com/example.jpg'
             }
           }
          }
        }))
        .then((asset) => asset.processForLocale("en-US")) // OR asset.processForAllLocales()
        .then((asset) => console.log(asset))
        .catch(console.error)

        Parameters

        • data: CreateAssetProps

          Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.

        Returns Promise<Asset>

        Promise for the newly created Asset

    • createAssetFromFiles: function
      • Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.

        example
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createAssetFromFiles({
          fields: {
            file: {
              'en-US': {
                 contentType: 'image/jpeg',
                 fileName: 'filename_english.jpg',
                 file: createReadStream('path/to/filename_english.jpg')
              },
              'de-DE': {
                 contentType: 'image/svg+xml',
                 fileName: 'filename_german.svg',
                 file: '<svg><path fill="red" d="M50 50h150v50H50z"/></svg>'
              }
            }
          }
        }))
        .then((asset) => console.log(asset))
        .catch(console.error)

        Parameters

        • data: Omit<AssetFileProp, "sys">

          Object representation of the Asset to be created. Note that the field object should have an uploadFrom property on asset creation, which will be removed and replaced with an url property when processing is finished.

        Returns Promise<Asset>

        Promise for the newly created Asset

    • createAssetKey: function
      • Creates an asset key for signing asset URLs (Embargoed Assets)

        example
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        // Create assetKey
        now = () => Math.floor(Date.now() / 1000)
        const withExpiryIn1Hour = () => now() + 1 * 60 * 60
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createAssetKey({ expiresAt: withExpiryIn1Hour() }))
        .then((policy, secret) => console.log({ policy, secret }))
        .catch(console.error)

        Parameters

        Returns Promise<AssetKey>

        Promise for the newly created AssetKey

    • createAssetWithId: function
      • Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.

        example
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        // Create asset
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createAssetWithId('<asset_id>', {
          title: {
            'en-US': 'Playsam Streamliner'
          },
          file: {
            'en-US': {
              contentType: 'image/jpeg',
              fileName: 'example.jpeg',
              upload: 'https://example.com/example.jpg'
            }
          }
        }))
        .then((asset) => asset.process())
        .then((asset) => console.log(asset))
        .catch(console.error)

        Parameters

        • id: string

          Asset ID

        • data: CreateAssetProps

          Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.

        Returns Promise<Asset>

        Promise for the newly created Asset

    • createContentType: function
      • Creates a Content Type

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createContentType({
          name: 'Blog Post',
          fields: [
            {
              id: 'title',
              name: 'Title',
              required: true,
              localized: false,
              type: 'Text'
            }
          ]
        }))
        .then((contentType) => console.log(contentType))
        .catch(console.error)

        Parameters

        Returns Promise<ContentType>

        Promise for the newly created Content Type

    • createContentTypeWithId: function
      • Creates a Content Type with a custom ID

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createContentTypeWithId('<content-type-id>', {
          name: 'Blog Post',
          fields: [
            {
              id: 'title',
              name: 'Title',
              required: true,
              localized: false,
              type: 'Text'
            }
          ]
        }))
        .then((contentType) => console.log(contentType))
        .catch(console.error)

        Parameters

        • contentTypeId: string

          Content Type ID

        • data: CreateContentTypeProps

          Object representation of the Content Type to be created

        Returns Promise<ContentType>

        Promise for the newly created Content Type

    • createEntry: function
      • createEntry(contentTypeId: string, data: Omit<EntryProps, "sys">): Promise<Entry>
      • Creates a Entry

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createEntry('<content_type_id>', {
          fields: {
            title: {
              'en-US': 'Entry title'
            }
          }
        }))
        .then((entry) => console.log(entry))
        .catch(console.error)

        Parameters

        • contentTypeId: string

          The Content Type ID of the newly created Entry

        • data: Omit<EntryProps, "sys">

          Object representation of the Entry to be created

        Returns Promise<Entry>

        Promise for the newly created Entry

    • createEntryWithId: function
      • Creates a Entry with a custom ID

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        // Create entry
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createEntryWithId('<content_type_id>', '<entry_id>', {
          fields: {
            title: {
              'en-US': 'Entry title'
            }
          }
        }))
        .then((entry) => console.log(entry))
        .catch(console.error)

        Parameters

        • contentTypeId: string

          The Content Type of the newly created Entry

        • id: string

          Entry ID

        • data: CreateEntryProps

          Object representation of the Entry to be created

        Returns Promise<Entry>

        Promise for the newly created Entry

    • createLocale: function
      • Creates a Locale

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        // Create locale
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createLocale({
          name: 'German (Austria)',
          code: 'de-AT',
          fallbackCode: 'de-DE',
          optional: true
        }))
        .then((locale) => console.log(locale))
        .catch(console.error)

        Parameters

        Returns Promise<Locale>

        Promise for the newly created Locale

    • createTag: function
    • createUiExtension: function
      • Creates a UI Extension

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createUiExtension({
          extension: {
            name: 'My awesome extension',
            src: 'https://example.com/my',
            fieldTypes: [
              {
                type: 'Symbol'
              },
              {
                type: 'Text'
              }
            ],
            sidebar: false
          }
        }))
        .then((extension) => console.log(extension))
        .catch(console.error)

        Parameters

        Returns Promise<Extension>

        Promise for the newly created UI Extension

    • createUiExtensionWithId: function
      • Creates a UI Extension with a custom ID

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createUiExtensionWithId('<extension_id>', {
          extension: {
            name: 'My awesome extension',
            src: 'https://example.com/my',
            fieldTypes: [
              {
                type: 'Symbol'
              },
              {
                type: 'Text'
              }
            ],
            sidebar: false
          }
        }))
        .then((extension) => console.log(extension))
        .catch(console.error)

        Parameters

        • id: string

          Extension ID

        • data: CreateExtensionProps

          Object representation of the UI Extension to be created

        Returns Promise<Extension>

        Promise for the newly created UI Extension

    • createUpload: function
      • createUpload(data: { file: string | ArrayBuffer | Stream }): Promise<{ delete: any } & UploadProps & { toPlainObject: any }>
      • Creates a Upload.

        example
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        const uploadStream = createReadStream('path/to/filename_english.jpg')
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.createUpload({file: uploadStream})
        .then((upload) => console.log(upload))
        .catch(console.error)

        Parameters

        • data: { file: string | ArrayBuffer | Stream }

          Object with file information.

          • file: string | ArrayBuffer | Stream

        Returns Promise<{ delete: any } & UploadProps & { toPlainObject: any }>

        Upload object containing information about the uploaded file.

    • delete: function
      • delete(): Promise<void>
      • Deletes the environment

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.delete())
        .then(() => console.log('Environment deleted.'))
        .catch(console.error)

        Returns Promise<void>

        Promise for the deletion. It contains no data, but the Promise error case should be handled.

    • deleteEntry: function
      • deleteEntry(id: string): Promise<void>
      • Deletes an Entry of this environement

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.deleteEntry("4bmLXiuviAZH3jkj5DLRWE"))
        .then(() => console.log('Entry deleted.'))
        .catch(console.error)

        Parameters

        • id: string

          Entry ID

        Returns Promise<void>

        Promise for the deletion. It contains no data, but the Promise error case should be handled.

    • getAppInstallation: function
      • Gets an App Installation

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
         .then((space) => space.getEnvironment('<environment-id>'))
         .then((environment) => environment.getAppInstallation('<app-definition-id>'))
         .then((appInstallation) => console.log(appInstallation))
         .catch(console.error)

        Parameters

        • id: string

          AppDefintion ID

        Returns Promise<AppInstallation>

        Promise for an App Installation

    • getAppInstallations: function
      • Gets a collection of App Installation

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
         .then((space) => space.getEnvironment('<environment-id>'))
         .then((environment) => environment.getAppInstallations()
         .then((response) => console.log(response.items))
         .catch(console.error)

        Returns Promise<Collection<AppInstallation, AppInstallationProps>>

        Promise for a collection of App Installations

    • getAsset: function
      • Gets an Asset Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getAsset('<asset_id>'))
        .then((asset) => console.log(asset))
        .catch(console.error)

        Parameters

        • id: string

          Asset ID

        • Default value query: QueryOptions = {}

          Object with search parameters. In this method it's only useful for locale.

        Returns Promise<Asset>

        Promise for an Asset

    • getAssetFromData: function
      • Creates SDK Asset object (locally) from entry data

        example
        environment.getAsset('asset_id').then(asset => {
        
          // Build a plainObject in order to make it usable for React (saving in state or redux)
          const plainObject = asset.toPlainObject();
        
          // The asset is being updated in some way as plainObject:
          const updatedPlainObject = {
            ...plainObject,
            fields: {
              ...plainObject.fields,
              title: {
                'en-US': 'updatedTitle'
              }
            }
          };
        
          // Rebuild an sdk object out of the updated plainObject:
          const assetWithMethodsAgain = environment.getAssetFromData(updatedPlainObject);
        
          // Update with help of the sdk method:
          assetWithMethodsAgain.update();
        
        });

        Parameters

        Returns Asset

        Asset

    • getAssets: function
      • Gets a collection of Assets Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getAssets())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<Asset, AssetProps>>

        Promise for a collection of Assets

    • getContentType: function
      • getContentType(contentTypeId: string): Promise<ContentType>
      • Gets a Content Type

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getContentType('<content_type_id>'))
        .then((contentType) => console.log(contentType))
        .catch(console.error)

        Parameters

        • contentTypeId: string

          Content Type ID

        Returns Promise<ContentType>

        Promise for a Content Type

    • getContentTypeSnapshots: function
      • Gets all snapshots of a contentType

        func

        getContentTypeSnapshots

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getContentTypeSnapshots('<contentTypeId>'))
        .then((snapshots) => console.log(snapshots.items))
        .catch(console.error)

        Parameters

        • contentTypeId: string

          Content Type ID

        • Default value query: QueryOptions = {}

          query additional query paramaters

        Returns Promise<Collection<Snapshot<ContentTypeProps>, SnapshotProps<ContentTypeProps>>>

        Promise for a collection of Content Type Snapshots

    • getContentTypes: function
      • Gets a collection of Content Types

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getContentTypes())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<ContentType, ContentTypeProps>>

        Promise for a collection of Content Types

    • getEditorInterfaceForContentType: function
      • getEditorInterfaceForContentType(contentTypeId: string): Promise<EditorInterface>
      • Gets an EditorInterface for a ContentType

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getEditorInterfaceForContentType('<content_type_id>'))
        .then((EditorInterface) => console.log(EditorInterface))
        .catch(console.error)

        Parameters

        • contentTypeId: string

          Content Type ID

        Returns Promise<EditorInterface>

        Promise for an EditorInterface

    • getEditorInterfaces: function
      • Gets all EditorInterfaces

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getEditorInterfaces())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Returns Promise<Collection<EditorInterface, EditorInterfaceProps>>

        Promise for a collection of EditorInterface

    • getEntries: function
      • Gets a collection of Entries Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getEntries({'content_type': 'foo'})) // you can add more queries as 'key': 'value'
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<Entry, EntryProps<Record<string, any>>>>

        Promise for a collection of Entries

    • getEntry: function
      • Gets an Entry Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getEntry('<entry-id>'))
        .then((entry) => console.log(entry))
        .catch(console.error)

        Parameters

        • id: string

          Entry ID

        • Default value query: QueryOptions = {}

          Object with search parameters. In this method it's only useful for locale.

        Returns Promise<Entry>

        Promise for an Entry

    • getEntryFromData: function
      • Creates SDK Entry object (locally) from entry data

        example
        environment.getEntry('entryId').then(entry => {
        
          // Build a plainObject in order to make it usable for React (saving in state or redux)
          const plainObject = entry.toPlainObject();
        
          // The entry is being updated in some way as plainObject:
          const updatedPlainObject = {
            ...plainObject,
            fields: {
              ...plainObject.fields,
              title: {
                'en-US': 'updatedTitle'
              }
            }
          };
        
          // Rebuild an sdk object out of the updated plainObject:
          const entryWithMethodsAgain = environment.getEntryFromData(updatedPlainObject);
        
          // Update with help of the sdk method:
          entryWithMethodsAgain.update();
        
        });

        Parameters

        Returns Entry

        Entry

    • getEntrySnapshots: function
      • Gets all snapshots of an entry

        func

        getEntrySnapshots

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getEntrySnapshots('<entry_id>'))
        .then((snapshots) => console.log(snapshots.items))
        .catch(console.error)

        Parameters

        • entryId: string

          Entry ID

        • Default value query: QueryOptions = {}

          query additional query paramaters

        Returns Promise<Collection<Snapshot<EntryProps<Record<string, any>>>, SnapshotProps<EntryProps<Record<string, any>>>>>

        Promise for a collection of Entry Snapshots

    • getLocale: function
      • getLocale(localeId: string): Promise<Locale>
      • Gets a Locale

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getLocale('<locale_id>'))
        .then((locale) => console.log(locale))
        .catch(console.error)

        Parameters

        • localeId: string

          Locale ID

        Returns Promise<Locale>

        Promise for an Locale

    • getLocales: function
      • Gets a collection of Locales

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getLocales())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Returns Promise<Collection<Locale, LocaleProps>>

        Promise for a collection of Locales

    • getTag: function
      • getTag(id: string): Promise<Tag>
    • getTags: function
    • getUiExtension: function
      • getUiExtension(id: string): Promise<Extension>
      • Gets an UI Extension

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getUiExtension('<extension-id>'))
        .then((extension) => console.log(extension))
        .catch(console.error)

        Parameters

        • id: string

          Extension ID

        Returns Promise<Extension>

        Promise for an UI Extension

    • getUiExtensions: function
      • Gets a collection of UI Extension

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getUiExtensions()
        .then((response) => console.log(response.items))
        .catch(console.error)

        Returns Promise<Collection<Extension, ExtensionProps>>

        Promise for a collection of UI Extensions

    • getUpload: function
      • getUpload(id: string): Promise<{ delete: any } & UploadProps & { toPlainObject: any }>
      • Gets an Upload

        example
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        const uploadStream = createReadStream('path/to/filename_english.jpg')
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => environment.getUpload('<upload-id>')
        .then((upload) => console.log(upload))
        .catch(console.error)

        Parameters

        • id: string

          Upload ID

        Returns Promise<{ delete: any } & UploadProps & { toPlainObject: any }>

        Promise for an Upload

    • update: function
      • Updates the environment

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environment-id>'))
        .then((environment) => {
          environment.name = 'New name'
          return environment.update()
        })
        .then((environment) => console.log(`Environment ${environment.sys.id} renamed.`)
        .catch(console.error)

        Returns Promise<Environment>

        Promise for the updated environment.

createExtensionApi

  • createExtensionApi(makeRequest: MakeRequest): { delete: any; update: any }

Const createFromFiles

createLocaleApi

  • createLocaleApi(makeRequest: MakeRequest): { delete: any; update: any }

createOrganizationApi

  • createOrganizationApi(makeRequest: MakeRequest): { createAppDefinition: any; createAppUpload: any; createOrganizationInvitation: any; createTeam: any; createTeamMembership: any; getAppDefinition: any; getAppDefinitions: any; getAppUpload: any; getOrganizationInvitation: any; getOrganizationMembership: any; getOrganizationMemberships: any; getOrganizationSpaceMembership: any; getOrganizationSpaceMemberships: any; getTeam: any; getTeamMembership: any; getTeamMemberships: any; getTeamSpaceMembership: any; getTeamSpaceMemberships: any; getTeams: any; getUser: any; getUsers: any }
  • Creates API object with methods to access the Organization API

    Parameters

    • makeRequest: MakeRequest

      function to make requests via an adapter

    Returns { createAppDefinition: any; createAppUpload: any; createOrganizationInvitation: any; createTeam: any; createTeamMembership: any; getAppDefinition: any; getAppDefinitions: any; getAppUpload: any; getOrganizationInvitation: any; getOrganizationMembership: any; getOrganizationMemberships: any; getOrganizationSpaceMembership: any; getOrganizationSpaceMemberships: any; getTeam: any; getTeamMembership: any; getTeamMemberships: any; getTeamSpaceMembership: any; getTeamSpaceMemberships: any; getTeams: any; getUser: any; getUsers: any }

    • createAppDefinition: function
      • Creates an app definition

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.createAppDefinition({
           name: 'Example app',
           locations: [{ location: 'app-config' }],
           src: "http://my-app-host.com/my-app"
         }))
        .then((appDefinition) => console.log(appDefinition))
        .catch(console.error)

        Parameters

        Returns Promise<AppDefinition>

        Promise for the newly created AppDefinition

    • createAppUpload: function
      • createAppUpload(file: string | ArrayBuffer | Stream): Promise<AppUpload>
      • Creates an app upload

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.createAppUpload('some_zip_file'))
        .then((appUpload) => console.log(appUpload))
        .catch(console.error)

        Parameters

        • file: string | ArrayBuffer | Stream

        Returns Promise<AppUpload>

        Promise for an App Upload

    • createOrganizationInvitation: function
      • Create an Invitation in Organization

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
         .then((organization) => organization.createOrganizationInvitation({
           email: 'user.email@example.com'
           firstName: 'User First Name'
           lastName: 'User Last Name'
           role: 'developer'
         })
        .catch(console.error)

        Parameters

        Returns Promise<OrganizationInvitation>

        Promise for a OrganizationInvitation in an organization

    • createTeam: function
      • Creates a Team

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.createTeam({
           name: 'new team',
           description: 'new team description'
         }))
        .then((team) => console.log(team))
        .catch(console.error)

        Parameters

        Returns Promise<Team>

    • createTeamMembership: function
      • Creates a Team membership

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organizationId')
        .then((org) => org.createTeamMembership('teamId', {
           admin: true,
           organizationMembershipId: 'organizationMembershipId'
         }))
        .then((teamMembership) => console.log(teamMembership))
        .catch(console.error)

        Parameters

        • teamId: string

          Id of the team the membership will be created in

        • data: CreateTeamMembershipProps

          Object representation of the Team Membership to be created

        Returns Promise<TeamMembership>

        Promise for the newly created TeamMembership

    • getAppDefinition: function
      • Gets an app definition

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.getAppDefinition('<app_definition_id>'))
        .then((appDefinition) => console.log(appDefinition))
        .catch(console.error)

        Parameters

        • id: string

        Returns Promise<AppDefinition>

        Promise for an App Definition

    • getAppDefinitions: function
      • Gets all app definitions

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.getAppDefinitions())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<AppDefinition, AppDefinitionProps>>

        Promise for a collection of App Definitions

    • getAppUpload: function
      • getAppUpload(appUploadId: string): Promise<AppUpload>
      • Gets an app upload

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((org) => org.getAppUpload('<app_upload_id>'))
        .then((appUpload) => console.log(appUpload))
        .catch(console.error)

        Parameters

        • appUploadId: string

        Returns Promise<AppUpload>

        Promise for an App Upload

    • getOrganizationInvitation: function
      • Gets an Invitation in Organization

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<org_id>')
        .then((organization) => organization.getOrganizationInvitation('invitation_id'))
        .then((invitation) => console.log(invitation))
        .catch(console.error)

        Parameters

        • invitationId: string

        Returns Promise<OrganizationInvitation>

        Promise for a OrganizationInvitation in an organization

    • getOrganizationMembership: function
      • Gets an Organization Membership

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organization_id')
        .then((organization) => organization.getOrganizationMembership('organizationMembership_id'))
        .then((organizationMembership) => console.log(organizationMembership))
        .catch(console.error)

        Parameters

        • id: string

          Organization Membership ID

        Returns Promise<OrganizationMembership>

        Promise for an Organization Membership

    • getOrganizationMemberships: function
      • Gets a collection of Organization Memberships

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organization_id')
        .then((organization) => organization.getOrganizationMemberships({'limit': 100})) // you can add more queries as 'key': 'value'
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<OrganizationMembership, OrganizationMembershipProps>>

        Promise for a collection of Organization Memberships

    • getOrganizationSpaceMembership: function
      • Gets an Space Membership in Organization

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organization_id')
        .then((organization) => organization.getOrganizationSpaceMembership('organizationSpaceMembership_id'))
        .then((organizationMembership) => console.log(organizationMembership))
        .catch(console.error)

        Parameters

        • id: string

          Organiztion Space Membership ID

        Returns Promise<SpaceMembership>

        Promise for a Space Membership in an organization

    • getOrganizationSpaceMemberships: function
      • Gets a collection Space Memberships in organization

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organization_id')
        .then((organization) => organization.getOrganizationSpaceMemberships()) // you can add queries like 'limit': 100
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<SpaceMembership, SpaceMembershipProps>>

        Promise for a Space Membership collection across all spaces in the organization

    • getTeam: function
      • getTeam(teamId: string): Promise<Team>
      • Gets an Team

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('orgId')
        .then((organization) => organization.getTeam('teamId'))
        .then((team) => console.log(team))
        .catch(console.error)

        Parameters

        • teamId: string

        Returns Promise<Team>

    • getTeamMembership: function
      • getTeamMembership(teamId: string, teamMembershipId: string): Promise<TeamMembership>
      • Gets an Team Membership from the team with given teamId

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organizationId')
        .then((organization) => organization.getTeamMembership('teamId', 'teamMembership_id'))
        .then((teamMembership) => console.log(teamMembership))
        .catch(console.error)

        Parameters

        • teamId: string
        • teamMembershipId: string

        Returns Promise<TeamMembership>

        Promise for an Team Membership

    • getTeamMemberships: function
      • Get all Team Memberships. If teamID is provided in the optional config object, it will return all Team Memberships in that team. By default, returns all team memberships for the organization.

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organizationId')
        .then((organization) => organization.getTeamMemberships('teamId'))
        .then((teamMemberships) => console.log(teamMemberships))
        .catch(console.error)

        Parameters

        • Default value opts: { query?: QueryOptions; teamId?: undefined | string } = {}
          • Optional query?: QueryOptions
          • Optional teamId?: undefined | string

        Returns Promise<Collection<TeamMembership, TeamMembershipProps>>

        Promise for a Team Membership Collection

    • getTeamSpaceMembership: function
      • Get a Team Space Membership with given teamSpaceMembershipId

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organizationId')
        .then((organization) => organization.getTeamSpaceMembership('teamSpaceMembershipId'))
        .then((teamSpaceMembership) => console.log(teamSpaceMembership))
        .catch(console.error)]

        Parameters

        • teamSpaceMembershipId: string

        Returns Promise<TeamSpaceMembership>

        Promise for a Team Space Membership

    • getTeamSpaceMemberships: function
      • Get all Team Space Memberships. If teamID is provided in the optional config object, it will return all Team Space Memberships in that team. By default, returns all team space memberships across all teams in the organization.

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('organizationId')
        .then((organization) => organization.getTeamSpaceMemberships('teamId'))
        .then((teamSpaceMemberships) => console.log(teamSpaceMemberships))
        .catch(console.error)

        Parameters

        • Default value opts: { query?: QueryOptions; teamId?: undefined | string } = {}
          • Optional query?: QueryOptions
          • Optional teamId?: undefined | string

        Returns Promise<Collection<TeamSpaceMembership, TeamSpaceMembershipProps>>

        Promise for a Team Space Membership Collection

    • getTeams: function
      • Gets all Teams in an organization

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('orgId')
        .then((organization) => organization.getTeams())
        .then((teams) => console.log(teams))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<Team, TeamProps>>

    • getUser: function
      • getUser(id: string): Promise<UserProps & { toPlainObject: any }>
      • Gets a User

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<organization_id>')
        .then((organization) => organization.getUser('id'))
        .then((user) => console.log(user))
        .catch(console.error)

        Parameters

        • id: string

        Returns Promise<UserProps & { toPlainObject: any }>

        Promise for a User

    • getUsers: function
      • Gets a collection of Users in organization

        example
        const contentful = require('contentful-management')
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getOrganization('<organization_id>')
        .then((organization) => organization.getUsers())
        .then((user) => console.log(user))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<UserProps & { toPlainObject: any }, UserProps>>

        Promise a collection of Users in organization

createOrganizationMembershipApi

  • createOrganizationMembershipApi(makeRequest: MakeRequest, organizationId: string): { delete: any; update: any }

Const createPlainClient

createPreviewApiKeyApi

  • createPreviewApiKeyApi(): {}

createRoleApi

  • createRoleApi(makeRequest: MakeRequest): { delete: any; update: any }

createScheduledActionApi

createSnapshotApi

  • createSnapshotApi(): {}

createSpaceApi

  • createSpaceApi(makeRequest: MakeRequest): { createApiKey: any; createApiKeyWithId: any; createEnvironment: any; createEnvironmentAliasWithId: any; createEnvironmentWithId: any; createRole: any; createRoleWithId: any; createScheduledAction: any; createSpaceMembership: any; createSpaceMembershipWithId: any; createTeamSpaceMembership: any; createWebhook: any; createWebhookWithId: any; delete: any; getApiKey: any; getApiKeys: any; getEnvironment: any; getEnvironmentAlias: any; getEnvironmentAliases: any; getEnvironments: any; getPreviewApiKey: any; getPreviewApiKeys: any; getRole: any; getRoles: any; getScheduledActions: any; getSpaceMember: any; getSpaceMembers: any; getSpaceMembership: any; getSpaceMemberships: any; getSpaceUser: any; getSpaceUsers: any; getTeamSpaceMembership: any; getTeamSpaceMemberships: any; getWebhook: any; getWebhooks: any; update: any }
  • Creates API object with methods to access the Space API

    Parameters

    • makeRequest: MakeRequest

      function to make requests via an adapter

    Returns { createApiKey: any; createApiKeyWithId: any; createEnvironment: any; createEnvironmentAliasWithId: any; createEnvironmentWithId: any; createRole: any; createRoleWithId: any; createScheduledAction: any; createSpaceMembership: any; createSpaceMembershipWithId: any; createTeamSpaceMembership: any; createWebhook: any; createWebhookWithId: any; delete: any; getApiKey: any; getApiKeys: any; getEnvironment: any; getEnvironmentAlias: any; getEnvironmentAliases: any; getEnvironments: any; getPreviewApiKey: any; getPreviewApiKeys: any; getRole: any; getRoles: any; getScheduledActions: any; getSpaceMember: any; getSpaceMembers: any; getSpaceMembership: any; getSpaceMemberships: any; getSpaceUser: any; getSpaceUsers: any; getTeamSpaceMembership: any; getTeamSpaceMemberships: any; getWebhook: any; getWebhooks: any; update: any }

    • createApiKey: function
      • Creates a Api Key

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createApiKey({
          name: 'API Key name',
          environments:[
           {
            sys: {
             type: 'Link'
             linkType: 'Environment',
             id:'<environment_id>'
            }
           }
          ]
          }
        }))
        .then((apiKey) => console.log(apiKey))
        .catch(console.error)

        Parameters

        Returns Promise<ApiKey>

        Promise for the newly created Api Key

    • createApiKeyWithId: function
      • Creates a Api Key with a custom ID

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createApiKeyWithId('<api-key-id>', {
          name: 'API Key name'
          environments:[
           {
            sys: {
             type: 'Link'
             linkType: 'Environment',
             id:'<environment_id>'
            }
           }
          ]
          }
        }))
        .then((apiKey) => console.log(apiKey))
        .catch(console.error)

        Parameters

        • id: string

          Api Key ID

        • payload: CreateApiKeyProps

          Object representation of the Api Key to be created

        Returns Promise<ApiKey>

        Promise for the newly created Api Key

    • createEnvironment: function
      • Creates an Environement

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createEnvironment({ name: 'Staging' }))
        .then((environment) => console.log(environment))
        .catch(console.error)

        Parameters

        Returns Promise<Environment>

        Promise for the newly created Environment

    • createEnvironmentAliasWithId: function
      • Creates an EnvironmentAlias with a custom ID

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createEnvironmentAliasWithId('<environment-alias-id>', {
          environment: {
            sys: { type: 'Link', linkType: 'Environment', id: 'targetEnvironment' }
          }
        }))
        .then((environmentAlias) => console.log(environmentAlias))
        .catch(console.error)

        Parameters

        • environmentAliasId: string

          EnvironmentAlias ID

        • data: CreateEnvironmentAliasProps

          Object representation of the EnvironmentAlias to be created

        Returns Promise<EnvironmentAlias>

        Promise for the newly created EnvironmentAlias

    • createEnvironmentWithId: function
      • Creates an Environment with a custom ID

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createEnvironmentWithId('<environment-id>', { name: 'Staging'}, 'master'))
        .then((environment) => console.log(environment))
        .catch(console.error)

        Parameters

        • id: string

          Environment ID

        • data: CreateEnvironmentProps

          Object representation of the Environment to be created

        • Optional sourceEnvironmentId: undefined | string

          ID of the source environment that will be copied to create the new environment. Default is "master"

        Returns Promise<Environment>

        Promise for the newly created Environment

    • createRole: function
      • Creates a Role

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        client.getSpace('<space_id>')
        .then((space) => space.createRole({
          name: 'My Role',
          description: 'foobar role',
          permissions: {
            ContentDelivery: 'all',
            ContentModel: ['read'],
            Settings: []
          },
          policies: [
            {
              effect: 'allow',
              actions: 'all',
              constraint: {
                and: [
                  {
                    equals: [
                      { doc: 'sys.type' },
                      'Entry'
                    ]
                  },
                  {
                    equals: [
                      { doc: 'sys.type' },
                      'Asset'
                    ]
                  }
                ]
              }
            }
          ]
        }))
        .then((role) => console.log(role))
        .catch(console.error)

        Parameters

        Returns Promise<Role>

        Promise for the newly created Role

    • createRoleWithId: function
      • createRoleWithId(id: string, roleData: Omit<RoleProps, "sys">): Promise<Role>
      • Creates a Role with a custom ID

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        client.getSpace('<space_id>')
        .then((space) => space.createRoleWithId('<role-id>', {
          name: 'My Role',
          description: 'foobar role',
          permissions: {
            ContentDelivery: 'all',
            ContentModel: ['read'],
            Settings: []
          },
          policies: [
            {
              effect: 'allow',
              actions: 'all',
              constraint: {
                and: [
                  {
                    equals: [
                      { doc: 'sys.type' },
                      'Entry'
                    ]
                  },
                  {
                    equals: [
                      { doc: 'sys.type' },
                      'Asset'
                    ]
                  }
                ]
              }
            }
          ]
        }))
        .then((role) => console.log(role))
        .catch(console.error)

        Parameters

        • id: string

          Role ID

        • roleData: Omit<RoleProps, "sys">

        Returns Promise<Role>

        Promise for the newly created Role

    • createScheduledAction: function
    • createSpaceMembership: function
      • Creates a Space Membership Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createSpaceMembership({
          admin: false,
          roles: [
            {
              type: 'Link',
              linkType: 'Role',
              id: '<role_id>'
            }
          ],
          email: 'foo@example.com'
        }))
        .then((spaceMembership) => console.log(spaceMembership))
        .catch(console.error)

        Parameters

        Returns Promise<SpaceMembership>

        Promise for the newly created Space Membership

    • createSpaceMembershipWithId: function
      • Creates a Space Membership with a custom ID Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createSpaceMembershipWithId('<space-membership-id>', {
          admin: false,
          roles: [
            {
              type: 'Link',
              linkType: 'Role',
              id: '<role_id>'
            }
          ],
          email: 'foo@example.com'
        }))
        .then((spaceMembership) => console.log(spaceMembership))
        .catch(console.error)

        Parameters

        Returns Promise<SpaceMembership>

        Promise for the newly created Space Membership

    • createTeamSpaceMembership: function
      • Creates a Team Space Membership

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createTeamSpaceMembership('team_id', {
          admin: false,
          roles: [
           {
        sys: {
              type: 'Link',
              linkType: 'Role',
              id: '<role_id>'
             }
           }
          ],
        }))
        .then((teamSpaceMembership) => console.log(teamSpaceMembership))
        .catch(console.error)

        Parameters

        Returns Promise<TeamSpaceMembership>

        Promise for the newly created Team Space Membership

    • createWebhook: function
      • Creates a Webhook

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.createWebhook({
          'name': 'My webhook',
          'url': 'https://www.example.com/test',
          'topics': [
            'Entry.create',
            'ContentType.create',
            '*.publish',
            'Asset.*'
          ]
        }))
        .then((webhook) => console.log(webhook))
        .catch(console.error)

        Parameters

        Returns Promise<WebHooks>

        Promise for the newly created Webhook

    • createWebhookWithId: function
      • Creates a Webhook with a custom ID

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.createWebhookWithId('<webhook_id>', {
          'name': 'My webhook',
          'url': 'https://www.example.com/test',
          'topics': [
            'Entry.create',
            'ContentType.create',
            '*.publish',
            'Asset.*'
          ]
        }))
        .then((webhook) => console.log(webhook))
        .catch(console.error)

        Parameters

        • id: string

          Webhook ID

        • data: CreateWebhooksProps

          Object representation of the Webhook to be created

        Returns Promise<WebHooks>

        Promise for the newly created Webhook

    • delete: function
      • delete(): Promise<void>
      • Deletes the space

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
          .then((space) => space.delete())
          .then(() => console.log('Space deleted.'))
          .catch(console.error)

        Returns Promise<void>

        Promise for the deletion. It contains no data, but the Promise error case should be handled.

    • getApiKey: function
      • getApiKey(id: string): Promise<ApiKey>
      • Gets a Api Key

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getApiKey('<apikey-id>'))
        .then((apikey) => console.log(apikey))
        .catch(console.error)

        Parameters

        • id: string

          API Key ID

        Returns Promise<ApiKey>

        Promise for a Api Key

    • getApiKeys: function
      • Gets a collection of Api Keys

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getApiKeys())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Returns Promise<Collection<ApiKey, ApiKeyProps>>

        Promise for a collection of Api Keys

    • getEnvironment: function
      • getEnvironment(environmentId: string): Promise<Environment>
      • Gets an environment

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironment('<environement_id>'))
        .then((environment) => console.log(environment))
        .catch(console.error)

        Parameters

        • environmentId: string

        Returns Promise<Environment>

        Promise for an Environment

    • getEnvironmentAlias: function
      • Gets an Environment Alias

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironmentAlias('<alias-id>'))
        .then((alias) => console.log(alias))
        .catch(console.error)

        Parameters

        • environmentAliasId: string

        Returns Promise<EnvironmentAlias>

        Promise for an Environment Alias

    • getEnvironmentAliases: function
      • Gets a collection of Environment Aliases

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironmentAliases()
        .then((response) => console.log(response.items))
        .catch(console.error)

        Returns Promise<Collection<EnvironmentAlias, EnvironmentAliasProps>>

        Promise for a collection of Environment Aliases

    • getEnvironments: function
      • Gets a collection of Environments

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getEnvironments())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<Environment, EnvironmentProps>>

        Promise for a collection of Environment

    • getPreviewApiKey: function
      • Gets a preview Api Key

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getPreviewApiKey('<preview-apikey-id>'))
        .then((previewApikey) => console.log(previewApikey))
        .catch(console.error)

        Parameters

        • id: string

          Preview API Key ID

        Returns Promise<PreviewApiKey>

        Promise for a Preview Api Key

    • getPreviewApiKeys: function
      • Gets a collection of preview Api Keys

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getPreviewApiKeys())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Returns Promise<Collection<PreviewApiKey, PreviewApiKeyProps>>

        Promise for a collection of Preview Api Keys

    • getRole: function
      • getRole(id: string): Promise<Role>
      • Gets a Role

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.createRole({
          fields: {
            title: {
              'en-US': 'Role title'
            }
          }
        }))
        .then((role) => console.log(role))
        .catch(console.error)

        Parameters

        • id: string

          Role ID

        Returns Promise<Role>

        Promise for a Role

    • getRoles: function
      • Gets a collection of Roles

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getRoles())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<Role, RoleProps>>

        Promise for a collection of Roles

    • getScheduledActions: function
    • getSpaceMember: function
      • getSpaceMember(id: string): Promise<SpaceMemberProps & { toPlainObject: any }>
      • Gets a Space Member

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.getSpaceMember(id))
        .then((spaceMember) => console.log(spaceMember))
        .catch(console.error)

        Parameters

        • id: string

          Get Space Member by user_id

        Returns Promise<SpaceMemberProps & { toPlainObject: any }>

        Promise for a Space Member

    • getSpaceMembers: function
      • Gets a collection of Space Members

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.getSpaceMembers({'limit': 100}))
        .then((spaceMemberCollection) => console.log(spaceMemberCollection))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<SpaceMemberProps & { toPlainObject: any }, SpaceMemberProps>>

        Promise for a collection of Space Members

    • getSpaceMembership: function
      • Gets a Space Membership Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.getSpaceMembership('id'))
        .then((spaceMembership) => console.log(spaceMembership))
        .catch(console.error)

        Parameters

        • id: string

          Space Membership ID

        Returns Promise<SpaceMembership>

        Promise for a Space Membership

    • getSpaceMemberships: function
      • Gets a collection of Space Memberships Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.getSpaceMemberships({'limit': 100})) // you can add more queries as 'key': 'value'
        .then((response) => console.log(response.items))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<SpaceMembership, SpaceMembershipProps>>

        Promise for a collection of Space Memberships

    • getSpaceUser: function
      • getSpaceUser(userId: string): Promise<UserProps & { toPlainObject: any }>
      • Gets a User

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.getSpaceUser('id'))
        .then((user) => console.log(user))
        .catch(console.error)

        Parameters

        • userId: string

          User ID

        Returns Promise<UserProps & { toPlainObject: any }>

        Promise for a User

    • getSpaceUsers: function
      • Gets a collection of Users in a space

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.getSpaceUsers(query))
        .then((data) => console.log(data))
        .catch(console.error)

        Parameters

        Returns Promise<Collection<UserProps & { toPlainObject: any }, UserProps>>

        Promise a collection of Users in a space

    • getTeamSpaceMembership: function
      • Gets a Team Space Membership

        example
        const contentful = require('contentful-management')
        
        client.getSpace('<space_id>')
        .then((space) => space.getTeamSpaceMembership('team_space_membership_id'))
        .then((teamSpaceMembership) => console.log(teamSpaceMembership))
        .catch(console.error)

        Parameters

        • teamSpaceMembershipId: string

        Returns Promise<TeamSpaceMembership>

        Promise for a Team Space Membership

    • getTeamSpaceMemberships: function
    • getWebhook: function
      • getWebhook(id: string): Promise<WebHooks>
      • Gets a Webhook

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getWebhook('<webhook_id>'))
        .then((webhook) => console.log(webhook))
        .catch(console.error)

        Parameters

        • id: string

          Webhook ID

        Returns Promise<WebHooks>

        Promise for a Webhook

    • getWebhooks: function
      • Gets a collection of Webhooks

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => space.getWebhooks())
        .then((response) => console.log(response.items))
        .catch(console.error)

        Returns Promise<Collection<WebHooks, WebhookProps>>

        Promise for a collection of Webhooks

    • update: function
      • update(): Promise<Space>
      • Updates the space

        example
        const contentful = require('contentful-management')
        
        const client = contentful.createClient({
          accessToken: '<content_management_api_key>'
        })
        
        client.getSpace('<space_id>')
        .then((space) => {
          space.name = 'New name'
          return space.update()
        })
        .then((space) => console.log(`Space ${space.sys.id} renamed.`)
        .catch(console.error)

        Returns Promise<Space>

        Promise for the updated space.

createSpaceMembershipApi

  • createSpaceMembershipApi(makeRequest: MakeRequest): { delete: any; update: any }

createTagApi

createTeamMembershipApi

  • createTeamMembershipApi(makeRequest: MakeRequest): { delete: any; update: any }

createTeamSpaceMembershipApi

  • createTeamSpaceMembershipApi(makeRequest: MakeRequest): { delete: any; update: any }

createUploadApi

  • createUploadApi(makeRequest: MakeRequest): { delete: any }

createWebhookApi

  • createWebhookApi(makeRequest: MakeRequest): { delete: any; getCall: any; getCalls: any; getHealth: any; update: any }

Const createWithId

Const del

Const get

Const getAppBundleUrl

Const getAppDefinitionUrl

Const getAppInstallationUrl

Const getAppUploadUrl

Const getBaseContentTypeUrl

Const getBaseEntryUrl

Const getBaseUrl

Const getCallDetails

Const getContentTypeUrl

Const getCurrent

  • getCurrent<T>(http: AxiosInstance, params?: QueryParams): Promise<T>

Const getEntityUrl

Const getEntryUrl

Const getEnvironmentAliasUrl

Const getExtensionUrl

Const getForContentType

Const getForEntry

Const getForOrganization

Const getForSpace

Const getHealthStatus

Const getMany

Const getManyCallDetails

Const getManyForContentType

Const getManyForEntry

Const getManyForOrganization

Const getManyForSpace

Const getManyForTeam

Const getTagUrl

getUploadHttpClient

  • getUploadHttpClient(http: AxiosInstance): AxiosInstance

Const getWebhookCallBaseUrl

Const getWebhookCallDetailsUrl

Const getWebhookCallUrl

Const getWebhookHealthUrl

Const getWebhookUrl

http

  • http<T>(http: AxiosInstance, url: string, config?: Omit<AxiosRequestConfig, "url">): Promise<T>
  • Type parameters

    • T = any

    Parameters

    • http: AxiosInstance
    • url: string
    • Optional config: Omit<AxiosRequestConfig, "url">

    Returns Promise<T>

Const isArchived

Const isDraft

Const isPublished

Const isUpdated

normalizeSelect

Const omitAndDeleteField

Const post

  • post<T>(http: AxiosInstance, url: string, payload?: any, config?: AxiosRequestConfig): Promise<T>
  • post<T>(http: AxiosInstance, __namedParameters: { config: undefined | AxiosRequestConfig; url: string }, payload?: any): Promise<T>
  • Type parameters

    • T = any

    Parameters

    • http: AxiosInstance
    • url: string
    • Optional payload: any
    • Optional config: AxiosRequestConfig

    Returns Promise<T>

  • Type parameters

    • T = any

    Parameters

    • http: AxiosInstance
    • __namedParameters: { config: undefined | AxiosRequestConfig; url: string }
      • config: undefined | AxiosRequestConfig
      • url: string
    • Optional payload: any

    Returns Promise<T>

Const processForAllLocales

Const processForLocale

  • processForLocale(http: AxiosInstance, __namedParameters: { asset: AssetProps; locale: string; options: { processingCheckRetries: undefined | number; processingCheckWait: undefined | number }; params: params }): Promise<AssetProps>
  • Parameters

    • http: AxiosInstance
    • __namedParameters: { asset: AssetProps; locale: string; options: { processingCheckRetries: undefined | number; processingCheckWait: undefined | number }; params: params }
      • asset: AssetProps
      • locale: string
      • options: { processingCheckRetries: undefined | number; processingCheckWait: undefined | number }
        • processingCheckRetries: undefined | number
        • processingCheckWait: undefined | number
      • params: params

    Returns Promise<AssetProps>

Const publish

Const put

  • put<T>(http: AxiosInstance, url: string, payload?: any, config?: AxiosRequestConfig): Promise<T>
  • put<T>(http: AxiosInstance, __namedParameters: { config: undefined | AxiosRequestConfig; url: string }, payload?: any): Promise<T>
  • Type parameters

    • T = any

    Parameters

    • http: AxiosInstance
    • url: string
    • Optional payload: any
    • Optional config: AxiosRequestConfig

    Returns Promise<T>

  • Type parameters

    • T = any

    Parameters

    • http: AxiosInstance
    • __namedParameters: { config: undefined | AxiosRequestConfig; url: string }
      • config: undefined | AxiosRequestConfig
      • url: string
    • Optional payload: any

    Returns Promise<T>

Const request

  • request<T>(http: AxiosInstance, __namedParameters: { config: undefined | AxiosRequestConfig; url: string }): Promise<T>
  • Type parameters

    • T = any

    Parameters

    • http: AxiosInstance
    • __namedParameters: { config: undefined | AxiosRequestConfig; url: string }
      • config: undefined | AxiosRequestConfig
      • url: string

    Returns Promise<T>

Const revoke

spaceMembershipDeprecationWarning

  • spaceMembershipDeprecationWarning(): void

Const unarchive

Const unpublish

Const update

Const upsert

Const validateTimestamp

Const wrap

  • wrap<ET, Action>(__namedParameters: { defaults: undefined | DefaultParams; makeRequest: MRInternal<false> }, entityType: ET, action: Action): WrapFn<ET, Action>

Const wrapCollection

  • wrapCollection<R, T, Rest>(fn: (makeRequest: MakeRequest, entity: T, ...rest: Rest) => R): (Anonymous function)
  • Type parameters

    • R

    • T

    • Rest: any[]

    Parameters

    • fn: (makeRequest: MakeRequest, entity: T, ...rest: Rest) => R
        • (makeRequest: MakeRequest, entity: T, ...rest: Rest): R
        • Parameters

          • makeRequest: MakeRequest
          • entity: T
          • Rest ...rest: Rest

          Returns R

    Returns (Anonymous function)

wrapScheduledAction

wrapTag

Object literals

Const InvitationAlphaHeaders

InvitationAlphaHeaders: object

x-contentful-enable-alpha-feature

x-contentful-enable-alpha-feature: string = "pending-org-membership"

Const OrganizationUserManagementAlphaHeaders

OrganizationUserManagementAlphaHeaders: object

x-contentful-enable-alpha-feature

x-contentful-enable-alpha-feature: string = "organization-user-management-api"

Const defaultHostParameters

defaultHostParameters: object

defaultHostname

defaultHostname: string = "api.contentful.com"

defaultHostnameUpload

defaultHostnameUpload: string = "upload.contentful.com"