11import { ContentEntitySys , ContentEntityType , Items , Link , Metadata } from './utils'
22
3- type TagVisibility = 'private' | 'public'
3+ export type TagVisibility = 'private' | 'public'
44
55export interface User {
66 /**
@@ -53,8 +53,8 @@ export interface Tag {
5353 id : string
5454 space : Link
5555 environment : Link
56- createdBy : Link
57- updatedBy : Link
56+ createdBy ? : Link
57+ updatedBy ? : Link
5858 createdAt : string
5959 updatedAt : string
6060 version : number
@@ -114,13 +114,15 @@ export interface Task {
114114 sys : TaskSys
115115}
116116
117- const enum PublicActionStatus {
118- Scheduled = 'scheduled' ,
119- Succeeded = 'succeeded' ,
120- Failed = 'failed' ,
121- Canceled = 'canceled' ,
117+ export enum ScheduledActionStatuses {
118+ scheduled = 'scheduled' ,
119+ inProgress = 'inProgress' ,
120+ succeeded = 'succeeded' ,
121+ failed = 'failed' ,
122+ canceled = 'canceled' ,
122123}
123-
124+ // WARNING: This is using 'keyof' which looks at the left hand name, not the right hand value
125+ type PublicActionStatus = keyof typeof ScheduledActionStatuses
124126type ScheduledActionActionType = 'publish' | 'unpublish'
125127
126128export interface ScheduledAction {
@@ -133,13 +135,7 @@ export interface ScheduledAction {
133135 /** ISO 8601 string */
134136 canceledAt ?: string
135137 canceledBy ?: Link
136- space : {
137- sys : {
138- id : string
139- linkType : 'Space'
140- type : string
141- }
142- }
138+ space : Link
143139 status : PublicActionStatus
144140 }
145141 entity : {
@@ -149,44 +145,40 @@ export interface ScheduledAction {
149145 type : string
150146 }
151147 }
152- environment : {
153- sys : {
154- id : string
155- linkType : 'Environment'
156- type : string
157- }
158- }
148+ environment ?: Link
159149 scheduledFor : {
160150 /** ISO 8601 string */
161151 datetime : string
162152 }
163153 action : ScheduledActionActionType
164154}
165155
166- export interface ContentTypeField {
167- disabled : boolean
156+ export interface ContentTypeField extends Items {
168157 id : string
169- localized : boolean
170158 name : string
171- omitted : boolean
172159 required : boolean
173- type : string
174- validations : Object [ ]
175- linkType ?: string
160+ localized : boolean
161+ disabled ?: boolean
162+ omitted ?: boolean
163+ deleted ?: boolean
176164 items ?: Items
165+ apiName ?: string
177166}
178167
179168export interface ContentType {
180169 sys : {
181170 type : string
182171 id : string
183- version ?: number
184- space ?: Link
185- environment ?: Link
186- createdAt ?: string
172+ version : number
187173 createdBy ?: Link
188- updatedAt ? : string
174+ createdAt : string
189175 updatedBy ?: Link
176+ updatedAt : string
177+ space : Link
178+ environment : Link
179+ firstPublishedAt ?: string
180+ publishedCounter ?: number
181+ publishedVersion ?: number
190182 }
191183 fields : ContentTypeField [ ]
192184 name : string
0 commit comments