@communecter/cocolight-api-client 1.0.127 → 1.0.128
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/dist/cocolight-api-client.browser.js +1 -1
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/src/Api.ts +6 -4
- package/src/ApiClient.ts +1 -1
- package/src/api/Action.ts +76 -0
- package/src/api/BaseEntity.ts +43 -22
- package/src/api/EndpointApi.types.ts +20 -4
- package/src/api/EntityRegistry.ts +16 -8
- package/src/api/Project.ts +17 -1
- package/src/api/User.ts +1 -0
- package/src/api/UserApi.ts +3 -2
- package/src/api/serverDataType/Action.ts +177 -0
- package/src/endpoints.module.ts +1 -1
- package/src/index.ts +3 -0
- package/src/types/entities.ts +3 -2
- package/types/api/Action.d.ts +27 -0
- package/types/api/BaseEntity.d.ts +21 -4
- package/types/api/EndpointApi.types.d.ts +3 -3
- package/types/api/EntityRegistry.d.ts +1 -1
- package/types/api/Project.d.ts +7 -0
- package/types/api/User.d.ts +1 -0
- package/types/api/serverDataType/Action.d.ts +150 -0
- package/types/endpoints.module.d.ts +3 -1
- package/types/index.d.ts +3 -0
- package/types/types/entities.d.ts +3 -2
package/src/index.ts
CHANGED
|
@@ -75,6 +75,7 @@ export type { News } from "./api/News.js";
|
|
|
75
75
|
export type { Comment } from "./api/Comment.js";
|
|
76
76
|
export type { Answer } from "./api/Answer.js";
|
|
77
77
|
export type { Form } from "./api/Form.js";
|
|
78
|
+
export type { Action } from "./api/Action.js";
|
|
78
79
|
|
|
79
80
|
// Types ServerData (données normalisées reçues du serveur)
|
|
80
81
|
export type * from "./api/serverDataType/User.js";
|
|
@@ -94,6 +95,8 @@ export type * from "./api/serverDataType/News.js";
|
|
|
94
95
|
export type * from "./api/serverDataType/Comment.js";
|
|
95
96
|
export type * from "./api/serverDataType/Answer.js";
|
|
96
97
|
export type * from "./api/serverDataType/Form.js";
|
|
98
|
+
export { ACTION_STATUSES } from "./api/serverDataType/Action.js";
|
|
99
|
+
export type * from "./api/serverDataType/Action.js";
|
|
97
100
|
export type * from "./api/serverDataType/common.js";
|
|
98
101
|
export type * from "./api/serverDataType/Country.js";
|
|
99
102
|
export type * from "./api/serverDataType/Zone.js";
|
package/src/types/entities.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// types/entities.ts - Types partagés pour éviter les dépendances circulaires
|
|
2
2
|
|
|
3
|
+
import type { Action } from "../api/Action.js";
|
|
3
4
|
import type { Answer } from "../api/Answer.js";
|
|
4
5
|
import type { Badge } from "../api/Badge.js";
|
|
5
6
|
import type { Classified } from "../api/Classified.js";
|
|
@@ -15,7 +16,7 @@ import type { User } from "../api/User.js";
|
|
|
15
16
|
/**
|
|
16
17
|
* Union type for all possible entity types
|
|
17
18
|
*/
|
|
18
|
-
export type EntityTypes = User | Organization | Project | Event | Poi | Badge | News | Comment | Answer | Form | Classified;
|
|
19
|
+
export type EntityTypes = User | Organization | Project | Event | Poi | Badge | News | Comment | Answer | Form | Classified | Action;
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Type union représentant les entités pouvant être retournées par une recherche.
|
|
@@ -35,7 +36,7 @@ export type EntityData =
|
|
|
35
36
|
/**
|
|
36
37
|
* Types de collection possibles
|
|
37
38
|
*/
|
|
38
|
-
export type CollectionType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "news" | "badges" | "comments" | "answers" | "forms" | "classifieds";
|
|
39
|
+
export type CollectionType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "news" | "badges" | "comments" | "answers" | "forms" | "classifieds" | "actions";
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* Types pour les références entre entités
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseEntity } from "./BaseEntity.js";
|
|
2
|
+
import type { CostumProjectActionRequestNewData } from "./EndpointApi.types.js";
|
|
3
|
+
import type { ActionItemNormalized } from "./serverDataType/Action.js";
|
|
4
|
+
/**
|
|
5
|
+
* Entité Action — tâche/jalon attaché à un Project.
|
|
6
|
+
*
|
|
7
|
+
* Toujours liée à un Project parent (parentType="projects" est const côté backend).
|
|
8
|
+
* S'instancie via `project.action(...)` plutôt que directement.
|
|
9
|
+
*
|
|
10
|
+
* Endpoints utilisés :
|
|
11
|
+
* - `get()` : hérité (GET_ELEMENTS_ABOUT via `/co2/element/about/type/actions/id/{id}`)
|
|
12
|
+
* - `_add()` : COSTUM_PROJECT_ACTION_REQUEST_NEW (parentId/parentType injectés depuis le parent)
|
|
13
|
+
*/
|
|
14
|
+
export declare class Action extends BaseEntity<ActionItemNormalized> {
|
|
15
|
+
static entityType: string;
|
|
16
|
+
static entityTag: string;
|
|
17
|
+
static SCHEMA_CONSTANTS: string[];
|
|
18
|
+
static ADD_BLOCKS: Map<"COSTUM_PROJECT_ACTION_REQUEST_NEW", "addAction">;
|
|
19
|
+
defaultFields: Record<string, any>;
|
|
20
|
+
removeFields: string[];
|
|
21
|
+
_add: (payload: Record<string, any>) => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Crée une nouvelle action via /costum/project/action/request/new.
|
|
24
|
+
* Méthode de bas niveau — utiliser `save()` après modification du draft à la place.
|
|
25
|
+
*/
|
|
26
|
+
addAction(data?: Partial<CostumProjectActionRequestNewData>): Promise<unknown>;
|
|
27
|
+
}
|
|
@@ -35,6 +35,9 @@ type BadgeInput = {
|
|
|
35
35
|
type NewsInput = {
|
|
36
36
|
id: string;
|
|
37
37
|
} | Record<string, any>;
|
|
38
|
+
type ActionInput = {
|
|
39
|
+
id: string;
|
|
40
|
+
} | Record<string, any>;
|
|
38
41
|
type ApiClient = import("../ApiClient.js").default;
|
|
39
42
|
type EndpointApi = import("./EndpointApi.js").default;
|
|
40
43
|
type User = import("./User.js").User;
|
|
@@ -48,7 +51,8 @@ type Comment = import("./Comment.js").Comment;
|
|
|
48
51
|
type Answer = import("./Answer.js").Answer;
|
|
49
52
|
type Form = import("./Form.js").Form;
|
|
50
53
|
type Classified = import("./Classified.js").Classified;
|
|
51
|
-
type
|
|
54
|
+
type Action = import("./Action.js").Action;
|
|
55
|
+
type AnyEntity = User | Organization | Project | Poi | EventEntity | Badge | News | Comment | Answer | Form | Classified | Action;
|
|
52
56
|
type ParentLike = BaseEntity<any> & {
|
|
53
57
|
apiClient: ApiClient;
|
|
54
58
|
userContext?: User | null;
|
|
@@ -70,6 +74,7 @@ interface Deps {
|
|
|
70
74
|
Answer?: any;
|
|
71
75
|
Form?: any;
|
|
72
76
|
Classified?: any;
|
|
77
|
+
Action?: any;
|
|
73
78
|
}
|
|
74
79
|
interface BaseEntityConfig {
|
|
75
80
|
entityTag?: string;
|
|
@@ -86,6 +91,7 @@ interface EntityTypeMap {
|
|
|
86
91
|
answers: Answer;
|
|
87
92
|
forms: Form;
|
|
88
93
|
classifieds: Classified;
|
|
94
|
+
actions: Action;
|
|
89
95
|
}
|
|
90
96
|
type ReadableWithMeta = import("stream").Readable & {
|
|
91
97
|
path?: string;
|
|
@@ -174,7 +180,7 @@ interface LinkMeta {
|
|
|
174
180
|
}
|
|
175
181
|
type BaseEntityCtor = typeof BaseEntity & {
|
|
176
182
|
entityTag: string;
|
|
177
|
-
entityType: "citoyens" | "organizations" | "projects" | "events" | "poi" | "badges" | "news" | "comments" | "answers" | "forms" | "classifieds";
|
|
183
|
+
entityType: "citoyens" | "organizations" | "projects" | "events" | "poi" | "badges" | "news" | "comments" | "answers" | "forms" | "classifieds" | "actions";
|
|
178
184
|
SCHEMA_CONSTANTS: string | string[];
|
|
179
185
|
};
|
|
180
186
|
interface FilterValueExistsOnly {
|
|
@@ -215,7 +221,7 @@ interface FinalizerResult<TOut> {
|
|
|
215
221
|
total: number;
|
|
216
222
|
} & Record<string, any>;
|
|
217
223
|
}
|
|
218
|
-
export type EntityType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "badges" | "news" | "comments" | "answers" | "forms" | "classifieds";
|
|
224
|
+
export type EntityType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "badges" | "news" | "comments" | "answers" | "forms" | "classifieds" | "actions";
|
|
219
225
|
/**
|
|
220
226
|
* Classe de base pour toutes les entités métiers : utilisateurs, projets, organisations, etc.
|
|
221
227
|
* Fournit un système de brouillon (draft), transformation, appel API sécurisé,
|
|
@@ -300,7 +306,7 @@ export declare class BaseEntity<TServerData = any> {
|
|
|
300
306
|
/** @returns Indique si cette entité représente l'utilisateur connecté */
|
|
301
307
|
get isMe(): boolean;
|
|
302
308
|
/** @returns Type de l'entité (ex: 'citoyens') */
|
|
303
|
-
getEntityType(): "citoyens" | "organizations" | "projects" | "events" | "poi" | "badges" | "news" | "comments" | "answers" | "forms" | "classifieds";
|
|
309
|
+
getEntityType(): "citoyens" | "organizations" | "projects" | "events" | "poi" | "badges" | "news" | "comments" | "answers" | "forms" | "classifieds" | "actions";
|
|
304
310
|
/**
|
|
305
311
|
* Indique si le draft contient des modifications par rapport aux données initiales.
|
|
306
312
|
* @returns {boolean}
|
|
@@ -1124,6 +1130,17 @@ export declare class BaseEntity<TServerData = any> {
|
|
|
1124
1130
|
* @throws {Error} Si une erreur se produit lors de la création de la news.
|
|
1125
1131
|
*/
|
|
1126
1132
|
news(newsData?: NewsInput): Promise<News>;
|
|
1133
|
+
/**
|
|
1134
|
+
* Crée une instance d'Action et la récupère si nécessaire.
|
|
1135
|
+
*
|
|
1136
|
+
* Par défaut une action ne peut être créée que depuis un Project — les autres
|
|
1137
|
+
* entités lèvent une erreur. Override sur Project pour activer le comportement.
|
|
1138
|
+
*
|
|
1139
|
+
* @param actionData - Les données pour initialiser l'action.
|
|
1140
|
+
* @returns Une promesse qui résout l'objet Action créé.
|
|
1141
|
+
* @throws {ApiError} Sur les entités non supportées.
|
|
1142
|
+
*/
|
|
1143
|
+
action(_actionData?: ActionInput): Promise<Action>;
|
|
1127
1144
|
/**
|
|
1128
1145
|
* Récupérer les organisations d'une entitée : la liste des organisations dont l'entité est membre ou admin valide.
|
|
1129
1146
|
* Constant : GET_ORGANIZATIONS_ADMIN | GET_ORGANIZATIONS_NO_ADMIN
|
|
@@ -399,7 +399,7 @@ export interface GetElementsAboutData {
|
|
|
399
399
|
/**
|
|
400
400
|
* Type d'entité
|
|
401
401
|
*/
|
|
402
|
-
type: "citoyens" | "projects" | "organizations" | "events" | "poi" | "badges" | "answers" | "classifieds" | "forms";
|
|
402
|
+
type: "citoyens" | "projects" | "organizations" | "events" | "poi" | "badges" | "answers" | "classifieds" | "forms" | "actions";
|
|
403
403
|
/**
|
|
404
404
|
* ID de l'utilisateur ou de l'entité
|
|
405
405
|
*/
|
|
@@ -4834,9 +4834,9 @@ export interface UpdatePathValueData {
|
|
|
4834
4834
|
/**
|
|
4835
4835
|
* Valeur à mettre à jour (peut être un objet, un tableau, une chaîne, etc.)
|
|
4836
4836
|
*/
|
|
4837
|
-
value: {
|
|
4837
|
+
value: string | number | boolean | {
|
|
4838
4838
|
[k: string]: unknown;
|
|
4839
|
-
};
|
|
4839
|
+
} | unknown[] | null;
|
|
4840
4840
|
[k: string]: unknown;
|
|
4841
4841
|
}
|
|
4842
4842
|
export interface DeleteDocumentByContextData {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CollectionType } from "../types/entities.js";
|
|
2
|
-
export type EntityTag = "User" | "Organization" | "Project" | "Event" | "Poi" | "Badge" | "News" | "Comment" | "Answer" | "Form" | "Classified";
|
|
2
|
+
export type EntityTag = "User" | "Organization" | "Project" | "Event" | "Poi" | "Badge" | "News" | "Comment" | "Answer" | "Form" | "Classified" | "Action";
|
|
3
3
|
export type CollectionKey = CollectionType;
|
|
4
4
|
type BaseEntity = import("./BaseEntity.js").BaseEntity<any>;
|
|
5
5
|
type ApiClient = import("../ApiClient.js").default;
|
package/types/api/Project.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseEntity } from "./BaseEntity.js";
|
|
2
|
+
import type { Action } from "./Action.js";
|
|
2
3
|
import type { PaginatorPage, PaginatorState } from "./BaseEntity.js";
|
|
3
4
|
import type { AddProjectData, GetContributorsAdminData, GetContributorsNoAdminData } from "./EndpointApi.types.js";
|
|
4
5
|
import type { Organization } from "./Organization.js";
|
|
@@ -135,6 +136,12 @@ export declare class Project extends BaseEntity<ProjectItemNormalized> {
|
|
|
135
136
|
* Crée une instance de news et la récupère si nécessaire.
|
|
136
137
|
*/
|
|
137
138
|
news(newsData?: Parameters<BaseEntity<ProjectItemNormalized>["news"]>[0]): Promise<import("./News.js").News>;
|
|
139
|
+
/**
|
|
140
|
+
* {@inheritDoc BaseEntity#action}
|
|
141
|
+
*
|
|
142
|
+
* Crée une instance d'Action liée à ce projet et la récupère si nécessaire.
|
|
143
|
+
*/
|
|
144
|
+
action(actionData?: Parameters<BaseEntity<ProjectItemNormalized>["action"]>[0]): Promise<Action>;
|
|
138
145
|
/**
|
|
139
146
|
* ───────────────────────────────
|
|
140
147
|
* Lien utilisateur ↔ projet
|
package/types/api/User.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare class User extends BaseEntity<UserItemNormalized> {
|
|
|
46
46
|
Comment: typeof import("./Comment.js").Comment;
|
|
47
47
|
Answer: typeof import("./Answer.js").Answer;
|
|
48
48
|
Classified?: typeof import("./Classified.js").Classified;
|
|
49
|
+
Action?: typeof import("./Action.js").Action;
|
|
49
50
|
});
|
|
50
51
|
get slug(): any;
|
|
51
52
|
get isMe(): boolean;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { IdObject, LinkContributorsRef, ParentsMap, DateValue } from "./common.js";
|
|
2
|
+
import type EJSONType from "../../EJSONType.js";
|
|
3
|
+
type ObjectIDCtor = typeof EJSONType["ObjectID"];
|
|
4
|
+
type ObjectID = InstanceType<ObjectIDCtor>;
|
|
5
|
+
/**
|
|
6
|
+
* Statuts supportés par une action (cf. COSTUM_PROJECT_ACTION_REQUEST_NEW).
|
|
7
|
+
*/
|
|
8
|
+
export declare const ACTION_STATUSES: readonly ["todo", "done", "tracking", "discuter", "next", "totest", "disabled", "closed"];
|
|
9
|
+
export type ActionStatus = (typeof ACTION_STATUSES)[number];
|
|
10
|
+
export interface ActionLinksBlock {
|
|
11
|
+
contributors?: Record<string, LinkContributorsRef>;
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface ActionMilestoneRef {
|
|
15
|
+
milestoneId: string;
|
|
16
|
+
startDate?: DateValue;
|
|
17
|
+
endDate?: DateValue;
|
|
18
|
+
}
|
|
19
|
+
export interface ActionCounts {
|
|
20
|
+
contributors?: number;
|
|
21
|
+
[k: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Historique des changements de statut (alimenté par /set_status côté backend).
|
|
25
|
+
* `update` est un MongoDate (DateValue côté Json, Date côté Normalized).
|
|
26
|
+
*/
|
|
27
|
+
export interface ActionUpdateStatusEntryJson {
|
|
28
|
+
status: ActionStatus;
|
|
29
|
+
author: string;
|
|
30
|
+
update: DateValue;
|
|
31
|
+
}
|
|
32
|
+
export interface ActionUpdateStatusEntryNormalized {
|
|
33
|
+
status: ActionStatus;
|
|
34
|
+
author: string;
|
|
35
|
+
update: Date;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Sous-tâche d'une action. Stockée dans `tasks[]`.
|
|
39
|
+
*/
|
|
40
|
+
export interface ActionTaskJson {
|
|
41
|
+
taskId?: string;
|
|
42
|
+
task?: string;
|
|
43
|
+
checked?: boolean;
|
|
44
|
+
userId?: string;
|
|
45
|
+
contributors?: Record<string, unknown>;
|
|
46
|
+
timeSpent?: number;
|
|
47
|
+
createdAt?: DateValue;
|
|
48
|
+
checkedAt?: DateValue;
|
|
49
|
+
[key: string]: unknown;
|
|
50
|
+
}
|
|
51
|
+
export interface ActionTaskNormalized {
|
|
52
|
+
taskId?: string;
|
|
53
|
+
task?: string;
|
|
54
|
+
checked?: boolean;
|
|
55
|
+
userId?: string;
|
|
56
|
+
contributors?: Record<string, unknown>;
|
|
57
|
+
timeSpent?: number;
|
|
58
|
+
createdAt?: Date;
|
|
59
|
+
checkedAt?: Date;
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Bloc media : galerie d'images + fichiers attachés (par IDs de documents).
|
|
64
|
+
*/
|
|
65
|
+
export interface ActionMedia {
|
|
66
|
+
type?: string;
|
|
67
|
+
countImages?: number;
|
|
68
|
+
images?: string[];
|
|
69
|
+
files?: string[];
|
|
70
|
+
[k: string]: unknown;
|
|
71
|
+
}
|
|
72
|
+
export interface ActionMediaFile {
|
|
73
|
+
files?: string[];
|
|
74
|
+
[k: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface ActionItemJson {
|
|
77
|
+
_id: IdObject;
|
|
78
|
+
collection: "actions";
|
|
79
|
+
name: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
status?: ActionStatus;
|
|
82
|
+
created?: DateValue;
|
|
83
|
+
updated?: DateValue;
|
|
84
|
+
modified?: DateValue;
|
|
85
|
+
startDate?: DateValue;
|
|
86
|
+
endDate?: DateValue;
|
|
87
|
+
parentId: string;
|
|
88
|
+
parentType: string;
|
|
89
|
+
parent?: ParentsMap;
|
|
90
|
+
tags?: string[];
|
|
91
|
+
links?: ActionLinksBlock;
|
|
92
|
+
creator?: string;
|
|
93
|
+
idUserAuthor?: string;
|
|
94
|
+
credits?: string;
|
|
95
|
+
idParentRoom?: string;
|
|
96
|
+
milestone?: ActionMilestoneRef;
|
|
97
|
+
importance?: string;
|
|
98
|
+
counts?: ActionCounts;
|
|
99
|
+
url?: string;
|
|
100
|
+
min?: number;
|
|
101
|
+
max?: number;
|
|
102
|
+
timeSpent?: number;
|
|
103
|
+
tracking?: boolean;
|
|
104
|
+
updateStatus?: ActionUpdateStatusEntryJson[];
|
|
105
|
+
rc?: unknown[];
|
|
106
|
+
tasks?: ActionTaskJson[];
|
|
107
|
+
media?: ActionMedia;
|
|
108
|
+
mediaFile?: ActionMediaFile;
|
|
109
|
+
[key: string]: unknown;
|
|
110
|
+
}
|
|
111
|
+
export interface ActionItemNormalized {
|
|
112
|
+
id: string;
|
|
113
|
+
_id: ObjectID;
|
|
114
|
+
collection: "actions";
|
|
115
|
+
name: string;
|
|
116
|
+
description?: string;
|
|
117
|
+
status?: ActionStatus;
|
|
118
|
+
created?: Date;
|
|
119
|
+
updated?: Date;
|
|
120
|
+
modified?: Date;
|
|
121
|
+
startDate?: Date;
|
|
122
|
+
endDate?: Date;
|
|
123
|
+
parentId: string;
|
|
124
|
+
parentType: string;
|
|
125
|
+
parent?: ParentsMap;
|
|
126
|
+
tags?: string[];
|
|
127
|
+
links?: ActionLinksBlock;
|
|
128
|
+
creator?: string;
|
|
129
|
+
idUserAuthor?: string;
|
|
130
|
+
credits?: number;
|
|
131
|
+
idParentRoom?: string;
|
|
132
|
+
milestone?: Omit<ActionMilestoneRef, "startDate" | "endDate"> & {
|
|
133
|
+
startDate?: Date;
|
|
134
|
+
endDate?: Date;
|
|
135
|
+
};
|
|
136
|
+
importance?: string;
|
|
137
|
+
counts?: ActionCounts;
|
|
138
|
+
url?: string;
|
|
139
|
+
min?: number;
|
|
140
|
+
max?: number;
|
|
141
|
+
timeSpent?: number;
|
|
142
|
+
tracking?: boolean;
|
|
143
|
+
updateStatus?: ActionUpdateStatusEntryNormalized[];
|
|
144
|
+
rc?: unknown[];
|
|
145
|
+
tasks?: ActionTaskNormalized[];
|
|
146
|
+
media?: ActionMedia;
|
|
147
|
+
mediaFile?: ActionMediaFile;
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
export {};
|
|
@@ -27378,7 +27378,9 @@ declare const endpoints: {
|
|
|
27378
27378
|
type: string;
|
|
27379
27379
|
})[];
|
|
27380
27380
|
};
|
|
27381
|
-
value: {
|
|
27381
|
+
value: {
|
|
27382
|
+
type: string[];
|
|
27383
|
+
};
|
|
27382
27384
|
app?: undefined;
|
|
27383
27385
|
email?: undefined;
|
|
27384
27386
|
isInvitation?: undefined;
|
package/types/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export type { News } from "./api/News.js";
|
|
|
56
56
|
export type { Comment } from "./api/Comment.js";
|
|
57
57
|
export type { Answer } from "./api/Answer.js";
|
|
58
58
|
export type { Form } from "./api/Form.js";
|
|
59
|
+
export type { Action } from "./api/Action.js";
|
|
59
60
|
export type * from "./api/serverDataType/User.js";
|
|
60
61
|
export type * from "./api/serverDataType/Organization.js";
|
|
61
62
|
export { ORGANIZATION_TYPES } from "./api/serverDataType/Organization.js";
|
|
@@ -71,6 +72,8 @@ export type * from "./api/serverDataType/News.js";
|
|
|
71
72
|
export type * from "./api/serverDataType/Comment.js";
|
|
72
73
|
export type * from "./api/serverDataType/Answer.js";
|
|
73
74
|
export type * from "./api/serverDataType/Form.js";
|
|
75
|
+
export { ACTION_STATUSES } from "./api/serverDataType/Action.js";
|
|
76
|
+
export type * from "./api/serverDataType/Action.js";
|
|
74
77
|
export type * from "./api/serverDataType/common.js";
|
|
75
78
|
export type * from "./api/serverDataType/Country.js";
|
|
76
79
|
export type * from "./api/serverDataType/Zone.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Action } from "../api/Action.js";
|
|
1
2
|
import type { Answer } from "../api/Answer.js";
|
|
2
3
|
import type { Badge } from "../api/Badge.js";
|
|
3
4
|
import type { Classified } from "../api/Classified.js";
|
|
@@ -12,7 +13,7 @@ import type { User } from "../api/User.js";
|
|
|
12
13
|
/**
|
|
13
14
|
* Union type for all possible entity types
|
|
14
15
|
*/
|
|
15
|
-
export type EntityTypes = User | Organization | Project | Event | Poi | Badge | News | Comment | Answer | Form | Classified;
|
|
16
|
+
export type EntityTypes = User | Organization | Project | Event | Poi | Badge | News | Comment | Answer | Form | Classified | Action;
|
|
16
17
|
/**
|
|
17
18
|
* Type union représentant les entités pouvant être retournées par une recherche.
|
|
18
19
|
* Inclut les utilisateurs, organisations, projets, événements et points d'intérêt.
|
|
@@ -35,7 +36,7 @@ export type EntityData = {
|
|
|
35
36
|
/**
|
|
36
37
|
* Types de collection possibles
|
|
37
38
|
*/
|
|
38
|
-
export type CollectionType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "news" | "badges" | "comments" | "answers" | "forms" | "classifieds";
|
|
39
|
+
export type CollectionType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "news" | "badges" | "comments" | "answers" | "forms" | "classifieds" | "actions";
|
|
39
40
|
/**
|
|
40
41
|
* Types pour les références entre entités
|
|
41
42
|
*/
|