Skip to content

Commit 86ca413

Browse files
author
naman-contentstack
committed
[DX-2403], major version bump
1 parent 0429b4b commit 86ca413

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

MIGRATION.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
## Migrating from v3 to v4
2+
3+
This document outlines the necessary change made to the `ISystemFields` interface.
4+
The `publish_details` field is no longer an array of objects — it is now a single object.
5+
6+
This update aligns the generated types with the actual Contentstack API response.
7+
8+
9+
10+
## Before
11+
12+
```typescript
13+
export interface ISystemFields {
14+
uid?: string;
15+
created_at?: string;
16+
updated_at?: string;
17+
created_by?: string;
18+
updated_by?: string;
19+
_content_type_uid?: string;
20+
tags?: string[];
21+
ACL?: any[];
22+
_version?: number;
23+
_in_progress?: boolean;
24+
locale?: string;
25+
publish_details?: IPublishDetails[]; // Incorrect: Array of IPublishDetails
26+
title?: string;
27+
}
28+
```
29+
30+
31+
## After
32+
```typescript
33+
export interface ISystemFields {
34+
uid?: string;
35+
created_at?: string;
36+
updated_at?: string;
37+
created_by?: string;
38+
updated_by?: string;
39+
_content_type_uid?: string;
40+
tags?: string[];
41+
ACL?: any[];
42+
_version?: number;
43+
_in_progress?: boolean;
44+
locale?: string;
45+
publish_details?: IPublishDetails; // Corrected: Single IPublishDetails object
46+
title?: string;
47+
}
48+
```
49+
---
50+
151
## Migrating from v2 to v3
252
This document outlines the necessary changes to separate nested modular blocks into distinct interfaces. This update will affect how modular blocks are structured and used throughout the codebase.
353

0 commit comments

Comments
 (0)