Options
All
  • Public
  • Public/Protected
  • All
Menu

tinacms-contentful

Index

Type aliases

ClientMode

ClientMode: "delivery" | "preview" | "management"

ContentfulMultiClient

ContentfulMultiClient: Pick<ContentfulClient, "authenticate" | "allowedOrigins"> & {}

ContentfulUpload

ContentfulUpload: { fields: { description: string; file: { contentType: string; file: string | ArrayBuffer | any; fileName: string }; title: string } }

Type declaration

  • fields: { description: string; file: { contentType: string; file: string | ArrayBuffer | any; fileName: string }; title: string }
    • description: string
    • file: { contentType: string; file: string | ArrayBuffer | any; fileName: string }
      • contentType: string
      • file: string | ArrayBuffer | any
      • fileName: string
    • title: string

Operation

Operation<Type>: Type extends "dereference" ? BaseOperation<"dereference"> & { fields: undefined } : BaseOperation<Type>

Type parameters

OperationType

OperationType: "create" | "update" | "dereference"

OptionalSpaceOptions

OptionalSpaceOptions: Partial<Omit<CreateClientParams, "accessToken" | "space" | "environment">> & { deliveryClient?: ContentfulClientApi; previewClient?: ContentfulClientApi }

Space

deprecated

Renamed to SpaceOptions. This type will be removed in v1.0.0.

getEntriesOptions

getEntriesOptions<Mode>: Omit<getEntryOptions<Mode>, "query">

Type parameters

getEntryOptions

getEntryOptions<Mode>: { locale?: string; mode?: Mode; preview?: boolean; query?: any }

Type parameters

Type declaration

  • Optional locale?: string
  • Optional mode?: Mode
  • Optional preview?: boolean
    deprecated

    Use mode instead. Will be removed in 1.0.0

  • Optional query?: any

Variables

Const AUTH_FAILURE

AUTH_FAILURE: "contentful:auth:failure" = 'contentful:auth:failure'

Const AUTH_SUCCESS

AUTH_SUCCESS: "contentful:auth:success" = 'contentful:auth:success'

Const CHANGE_ENVIRONMENT

CHANGE_ENVIRONMENT: "contentful:environment:change" = 'contentful:environment:change'

Const CONTENTFUL_AUTH_HOSTNAME

CONTENTFUL_AUTH_HOSTNAME: "be.contentful.com" = 'be.contentful.com'

Const CONTENTFUL_AUTH_TOKEN

CONTENTFUL_AUTH_TOKEN: "TINACMS_CONTENTFUL_USER_AUTH_TOKEN" = 'TINACMS_CONTENTFUL_USER_AUTH_TOKEN'

Const CREATE_ENVIRONMENT

CREATE_ENVIRONMENT: "contentful:environment:create" = 'contentful:environment:create'

Const ENTRY_DELETE

ENTRY_DELETE: "contentful:entry:delete" = 'contentful:entry:delete'

Const ENTRY_PUBLISH

ENTRY_PUBLISH: "contentful:entry:publish" = 'contentful:entry:publish'

Const ENTRY_UPDATE

ENTRY_UPDATE: "contentful:entry:update" = 'contentful:entry:update'

Const ERROR

ERROR: "contentful:error" = 'contentful:error'

Const FILE_TYPES

FILE_TYPES: FileTypes = ...

Const ON_LOGIN

ON_LOGIN: "contentful:login" = 'contentful:login'

Const ON_LOGOUT

ON_LOGOUT: "contentful:logout" = 'contentful:logout'

Functions

authenticateWithContentful

  • authenticateWithContentful(clientId: string, redirectUrl: string, allowedOrigins: string[], authWindow?: Window): Promise<string>

createContentfulClientForSpaces

Const createContentfulOperationsForEntries

  • createContentfulOperationsForEntries(initial: Entry<any>[], updated: Entry<any>[], parent?: null | Entry<any>, options?: GraphOptions): { create: BaseOperation<"create">[]; dereference: (Entry<unknown> & { type: "dereference" } & { fields: undefined })[]; graph: OperationsGraph; update: BaseOperation<"update">[] }
  • Takes an initial and updated state of an array of entries, and computes a graph of the changes:

    • nodes: the individual operations to run to update the delta
    • edges: the relationships between operations, allowing different traversal paths

    Parameters

    • initial: Entry<any>[]

      The initial state of the entry

    • updated: Entry<any>[]

      The updated state of the entry

    • parent: null | Entry<any> = null
    • Optional options: GraphOptions

    Returns { create: BaseOperation<"create">[]; dereference: (Entry<unknown> & { type: "dereference" } & { fields: undefined })[]; graph: OperationsGraph; update: BaseOperation<"update">[] }

    operations and the graph

    • create: BaseOperation<"create">[]
    • dereference: (Entry<unknown> & { type: "dereference" } & { fields: undefined })[]
    • graph: OperationsGraph
    • update: BaseOperation<"update">[]

Const createContentfulOperationsForEntry

  • createContentfulOperationsForEntry(initial: null | Entry<any>, updated: null | Entry<any>, options?: GraphOptions): { create: BaseOperation<"create">[]; dereference: (Entry<unknown> & { type: "dereference" } & { fields: undefined })[]; graph: OperationsGraph; update: BaseOperation<"update">[] }
  • Takes an initial and updated state of an entry, and computes a graph of the changes:

    • nodes: the individual operations to run to update the delta
    • edges: the relationships between operations, allowing different traversal paths

    Parameters

    • initial: null | Entry<any>

      The initial state of the entry

    • updated: null | Entry<any>

      The updated state of the entry

    • Optional options: GraphOptions

    Returns { create: BaseOperation<"create">[]; dereference: (Entry<unknown> & { type: "dereference" } & { fields: undefined })[]; graph: OperationsGraph; update: BaseOperation<"update">[] }

    operations and the graph

    • create: BaseOperation<"create">[]
    • dereference: (Entry<unknown> & { type: "dereference" } & { fields: undefined })[]
    • graph: OperationsGraph
    • update: BaseOperation<"update">[]

createFieldConfigFromContentType

  • createFieldConfigFromContentType(contentType: ContentType): TinaField<any>[]

getBearerToken

  • getBearerToken(window: Window, allowedOrigins?: string[]): void

getCachedBearerToken

  • getCachedBearerToken(): undefined | string

onBearerToken

  • onBearerToken(allowedOrigins?: string[]): Promise<string>

openOauthWindow

  • openOauthWindow(clientId: string, redirectUrl: string): Window

setCachedBearerToken

  • setCachedBearerToken(bearerToken: string, secure?: boolean): void

Generated using TypeDoc