You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This changelog documents a breaking change to the `ISystemFields` interface, specifically related to the `publish_details` field.
4
+
5
+
6
+
## What Changed
7
+
8
+
The `publish_details` field is no longer an array of objects. It is now represented as a single `IPublishDetails` object.
9
+
10
+
This update aligns the generated types with the actual [Contentstack API](https://www.contentstack.com/docs/developers/apis/content-delivery-api) response.
11
+
12
+
13
+
## Before
14
+
15
+
```typescript
16
+
exportinterfaceISystemFields {
17
+
uid?:string;
18
+
created_at?:string;
19
+
updated_at?:string;
20
+
created_by?:string;
21
+
updated_by?:string;
22
+
_content_type_uid?:string;
23
+
tags?:string[];
24
+
ACL?:any[];
25
+
_version?:number;
26
+
_in_progress?:boolean;
27
+
locale?:string;
28
+
publish_details?:IPublishDetails[]; // Incorrect: Array of IPublishDetails
29
+
title?:string;
30
+
}
31
+
```
32
+
33
+
34
+
## After
35
+
```typescript
36
+
exportinterfaceISystemFields {
37
+
uid?:string;
38
+
created_at?:string;
39
+
updated_at?:string;
40
+
created_by?:string;
41
+
updated_by?:string;
42
+
_content_type_uid?:string;
43
+
tags?:string[];
44
+
ACL?:any[];
45
+
_version?:number;
46
+
_in_progress?:boolean;
47
+
locale?:string;
48
+
publish_details?:IPublishDetails; // Corrected: Single IPublishDetails object
Copy file name to clipboardExpand all lines: README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,11 @@ This library helps to generate TypeScript type definition for the content types
6
6
7
7
`$ npm install @contentstack/types-generator`
8
8
9
+
10
+
## Migration
11
+
Refer to the [Migration Guide](https://github.com/contentstack/types-generator/blob/main/MIGRATION.md) version 3 if you are migrating from version 2 or older.
0 commit comments