Skip to content

Commit

Permalink
fix: change ContentType API to public type (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
andipaetzold authored Jun 14, 2021
1 parent d750f83 commit 88742a1
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions lib/types/api.types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ContentType, EditorInterface, SpaceMembership, Role } from './entities'
import { ContentType, EditorInterface, SpaceMembership, Role, ContentTypeField } from './entities'
import { EntryAPI } from './entry.types'
import { SpaceAPI } from './space.types'
import { WindowAPI } from './window.types'
import { ContentEntitySys, Metadata } from './utils'
import { ContentEntitySys, Link, Metadata } from './utils'
import { FieldAPI } from './field-locale.types'
import { DialogsAPI } from './dialogs.types'
import { AppConfigAPI } from './app.types'
Expand Down Expand Up @@ -84,6 +84,23 @@ export interface IdsAPI {
contentType: string
}

/** Content API */
export interface ContentTypeAPI {
sys: {
id: string
type: 'ContentType'
revision: number
space: Link<'Space', 'Link'>
environment: Link<'Environment', 'Link'>
createdAt?: string
updatedAt?: string
}
fields: ContentTypeField[]
name: string
displayField: string
description: string
}

export interface EditorLocaleSettings {
mode: 'multi' | 'single'
focused?: string
Expand Down Expand Up @@ -216,7 +233,7 @@ export interface ConnectMessage {
user: UserAPI
initialContentTypes: ContentType[]
ids: IdsAPI
contentType: ContentType
contentType: ContentTypeAPI
editorInterface?: EditorInterface
entry: {
sys: ContentEntitySys
Expand Down

0 comments on commit 88742a1

Please sign in to comment.