@@ -24,13 +24,21 @@ private function __construct(
2424 public readonly string $ id ,
2525 public readonly DateTimeImmutable $ createdTime ,
2626 public readonly DateTimeImmutable $ lastEditedTime ,
27- public readonly bool $ in_trash ,
27+ public readonly bool $ inTrash ,
2828 public readonly bool $ hasChildren ,
2929 public readonly BlockType $ type ,
3030 private readonly string |null $ unknownType = null
3131 ) {
32+ /** @psalm-suppress DeprecatedProperty */
33+ $ this ->archived = $ inTrash ;
3234 }
3335
36+ /**
37+ * @deprecated 1.17.0 Use `$inTrash` instead.
38+ * @codeCoverageIgnore
39+ */
40+ public readonly bool $ archived ;
41+
3442 /** @internal */
3543 public static function create (BlockType $ type ): self
3644 {
@@ -68,7 +76,7 @@ public function toArray(): array
6876 "object " => "block " ,
6977 "created_time " => $ this ->createdTime ->format (Date::FORMAT ),
7078 "last_edited_time " => $ this ->lastEditedTime ->format (Date::FORMAT ),
71- "in_trash " => $ this ->in_trash ,
79+ "in_trash " => $ this ->inTrash ,
7280 "has_children " => $ this ->hasChildren ,
7381 "type " => $ type ,
7482 ];
@@ -81,7 +89,7 @@ public function toArray(): array
8189 }
8290
8391 /** @internal */
84- public function archive (): self
92+ public function delete (): self
8593 {
8694 return new self (
8795 $ this ->id ,
@@ -113,7 +121,7 @@ public function updateHasChildren(bool $hasChildren): self
113121 $ this ->id ,
114122 $ this ->createdTime ,
115123 new DateTimeImmutable ("now " ),
116- $ this ->in_trash ,
124+ $ this ->inTrash ,
117125 $ hasChildren ,
118126 $ this ->type ,
119127 );
@@ -125,7 +133,7 @@ public function update(): self
125133 $ this ->id ,
126134 $ this ->createdTime ,
127135 new DateTimeImmutable ("now " ),
128- $ this ->in_trash ,
136+ $ this ->inTrash ,
129137 $ this ->hasChildren ,
130138 $ this ->type ,
131139 );
0 commit comments