@communecter/cocolight-api-client 1.0.56 → 1.0.58

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/types/index.d.ts CHANGED
@@ -50,9 +50,15 @@ export type { Event } from "./api/Event.js";
50
50
  export type { Poi } from "./api/Poi.js";
51
51
  export type { Badge } from "./api/Badge.js";
52
52
  export type { News } from "./api/News.js";
53
+ export type { Comment } from "./api/Comment.js";
54
+ export type { Answer } from "./api/Answer.js";
53
55
  export type * from "./api/serverDataType/User.js";
54
56
  export type * from "./api/serverDataType/Organization.js";
55
57
  export type * from "./api/serverDataType/Project.js";
58
+ export type * from "./api/serverDataType/Event.js";
59
+ export type * from "./api/serverDataType/News.js";
60
+ export type * from "./api/serverDataType/Comment.js";
61
+ export type * from "./api/serverDataType/Answer.js";
56
62
  export type * from "./api/serverDataType/common.js";
57
63
  export type { PaginatorPage } from "./api/BaseEntity.js";
58
64
  export type * from "./types/index.js";
@@ -1,7 +1,34 @@
1
+ import type { Answer } from "../api/Answer.js";
2
+ import type { Badge } from "../api/Badge.js";
3
+ import type { Comment } from "../api/Comment.js";
4
+ import type { Event } from "../api/Event.js";
5
+ import type { News } from "../api/News.js";
6
+ import type { Organization } from "../api/Organization.js";
7
+ import type { Poi } from "../api/Poi.js";
8
+ import type { Project } from "../api/Project.js";
9
+ import type { User } from "../api/User.js";
10
+ /**
11
+ * Union type for all possible entity types
12
+ */
13
+ export type EntityTypes = User | Organization | Project | Event | Poi | Badge | News | Comment | Answer;
14
+ /**
15
+ * Type pour récupérer une entité existante via l'API publique.
16
+ * Nécessite soit un id, soit un slug.
17
+ * Les propriétés additionnelles sont autorisées mais ignorées lors de la récupération.
18
+ */
19
+ export type EntityData = {
20
+ id: string;
21
+ slug?: string;
22
+ [key: string]: any;
23
+ } | {
24
+ slug: string;
25
+ id?: string;
26
+ [key: string]: any;
27
+ };
1
28
  /**
2
29
  * Types de collection possibles
3
30
  */
4
- export type CollectionType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "news" | "badges" | "comments";
31
+ export type CollectionType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "news" | "badges" | "comments" | "answers";
5
32
  /**
6
33
  * Types pour les références entre entités
7
34
  */