@datagouv/components-next 1.4.1-dev.1344.ge35efbbf → 1.4.1-dev.1345.g53dc9b2a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "1.4.1-dev.1344.ge35efbbf",
3
+ "version": "1.4.1-dev.1345.g53dc9b2a",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
package/src/main.ts CHANGED
@@ -14,7 +14,7 @@ import type { Member, MemberRole, NewOrganization, Organization, OrganizationOrS
14
14
  import type { Owned, OwnedWithFullObject, OwnedWithId } from './types/owned'
15
15
  import type { Comment, Thread } from './types/discussions'
16
16
  import type { PageBloc, ContentBloc, BlocWithTitle, DatasetsListBloc, DataservicesListBloc, ReusesListBloc, LinkInBloc, LinksListBloc, MarkdownBloc, AccordionItemBloc, AccordionListBloc, HeroBloc } from './types/pages'
17
- import type { Post } from './types/posts'
17
+ import type { Post, PostAncestor } from './types/posts'
18
18
  import type { ReuseReference, NewReuse, Reuse, ReuseV2, ReuseTopic, ReuseType } from './types/reuses'
19
19
  import type { RegisteredSchema, Schema, SchemaDetails, SchemaField, SchemaPath, SchemaPublicationMode, SchemaResponseData, SchemaVersion, ValidataError } from './types/schemas'
20
20
  import type { TopicV2, TopicElement, TopicElementClass, TopicElementRel } from './types/topics'
@@ -229,6 +229,7 @@ export type {
229
229
  HeroBloc,
230
230
  PaginatedArray,
231
231
  Post,
232
+ PostAncestor,
232
233
  Thread,
233
234
  Quality,
234
235
  RegisteredSchema,
@@ -3,7 +3,10 @@ import type { PageBloc } from './pages'
3
3
  import type { Reuse } from './reuses'
4
4
  import type { User } from './users'
5
5
 
6
+ export type PostAncestor = Pick<Post, 'id' | 'name' | 'page'>
7
+
6
8
  export type Post = {
9
+ ancestors: Array<PostAncestor>
7
10
  body_type: 'markdown' | 'html' | 'blocs'
8
11
  blocs: Array<PageBloc>
9
12
  content: string
@@ -19,6 +22,7 @@ export type Post = {
19
22
  name: string
20
23
  owner: User
21
24
  page: string
25
+ parent: PostAncestor | null
22
26
  published: string | null
23
27
  reuses: Array<Pick<Reuse, 'id' | 'image' | 'image_thumbnail' | 'page' | 'title' | 'uri'>>
24
28
  slug: string