@communecter/cocolight-api-client 1.0.130 → 1.0.132

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.
Files changed (48) hide show
  1. package/dist/cocolight-api-client.browser.js +3 -3
  2. package/dist/cocolight-api-client.cjs +1 -1
  3. package/dist/cocolight-api-client.mjs.js +1 -1
  4. package/dist/cocolight-api-client.vite.mjs.js +1 -1
  5. package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
  6. package/package.json +1 -1
  7. package/src/Api.ts +4 -4
  8. package/src/ApiClient.ts +3 -1
  9. package/src/api/Action.ts +535 -4
  10. package/src/api/Answer.ts +4 -1
  11. package/src/api/Badge.ts +5 -0
  12. package/src/api/BaseEntity.ts +118 -7
  13. package/src/api/Classified.ts +4 -0
  14. package/src/api/Comment.ts +3 -0
  15. package/src/api/EndpointApi.ts +96 -1
  16. package/src/api/EndpointApi.types.ts +448 -44
  17. package/src/api/Event.ts +5 -0
  18. package/src/api/Form.ts +64 -2
  19. package/src/api/News.ts +3 -0
  20. package/src/api/Organization.ts +47 -3
  21. package/src/api/Poi.ts +4 -0
  22. package/src/api/Project.ts +61 -0
  23. package/src/api/User.ts +10 -0
  24. package/src/api/serverDataType/Answer.ts +25 -0
  25. package/src/api/serverDataType/Form.ts +84 -4
  26. package/src/api/serverDataType/Organization.ts +13 -0
  27. package/src/api/serverDataType/Project.ts +15 -0
  28. package/src/endpoints.module.ts +1252 -268
  29. package/types/api/Action.d.ts +276 -2
  30. package/types/api/Answer.d.ts +1 -0
  31. package/types/api/Badge.d.ts +1 -0
  32. package/types/api/BaseEntity.d.ts +62 -0
  33. package/types/api/Classified.d.ts +1 -0
  34. package/types/api/Comment.d.ts +1 -0
  35. package/types/api/EndpointApi.d.ts +60 -1
  36. package/types/api/EndpointApi.types.d.ts +397 -41
  37. package/types/api/Event.d.ts +1 -0
  38. package/types/api/Form.d.ts +34 -0
  39. package/types/api/News.d.ts +1 -0
  40. package/types/api/Organization.d.ts +20 -1
  41. package/types/api/Poi.d.ts +1 -0
  42. package/types/api/Project.d.ts +29 -0
  43. package/types/api/User.d.ts +7 -0
  44. package/types/api/serverDataType/Answer.d.ts +22 -0
  45. package/types/api/serverDataType/Form.d.ts +89 -4
  46. package/types/api/serverDataType/Organization.d.ts +13 -0
  47. package/types/api/serverDataType/Project.d.ts +15 -0
  48. package/types/endpoints.module.d.ts +2825 -1491
@@ -8,15 +8,139 @@ import type { ActionItemNormalized } from "./serverDataType/Action.js";
8
8
  * S'instancie via `project.action(...)` plutôt que directement.
9
9
  *
10
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)
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
+ * - `_update()` : UPDATE_PATH_VALUE field par field via CUSTOM_FIELD_HANDLERS
14
+ * (pas d'endpoint dédié par bloc côté backend — on dispatche chaque champ modifié)
13
15
  */
14
16
  export declare class Action extends BaseEntity<ActionItemNormalized> {
15
17
  static entityType: string;
16
18
  static entityTag: string;
17
19
  static SCHEMA_CONSTANTS: string[];
20
+ /**
21
+ * Schémas virtuels : enregistrent les champs éditables auprès du draft proxy
22
+ * via _composeAllowedFields. Aucun endpoint backend réel — l'update passe par
23
+ * UPDATE_PATH_VALUE field par field.
24
+ */
25
+ static VIRTUAL_SCHEMAS: {
26
+ VIRTUAL_ACTION_EDITABLE: {
27
+ type: string;
28
+ properties: {
29
+ name: {
30
+ type: string;
31
+ };
32
+ credits: {
33
+ type: string;
34
+ };
35
+ min: {
36
+ type: string;
37
+ minimum: number;
38
+ };
39
+ max: {
40
+ type: string;
41
+ minimum: number;
42
+ };
43
+ status: {
44
+ type: string;
45
+ enum: string[];
46
+ };
47
+ tags: {
48
+ type: string;
49
+ items: {
50
+ type: string;
51
+ };
52
+ };
53
+ links: {
54
+ type: string;
55
+ };
56
+ startDate: {
57
+ oneOf: {
58
+ type: string;
59
+ }[];
60
+ };
61
+ endDate: {
62
+ oneOf: {
63
+ type: string;
64
+ }[];
65
+ };
66
+ milestone: {
67
+ oneOf: {
68
+ type: string;
69
+ }[];
70
+ };
71
+ importance: {
72
+ type: string;
73
+ };
74
+ };
75
+ };
76
+ };
18
77
  static ADD_BLOCKS: Map<"COSTUM_PROJECT_ACTION_REQUEST_NEW", "addAction">;
78
+ /**
79
+ * Champs éditables → méthode publique qui réalise l'update (via UPDATE_PATH_VALUE).
80
+ * Même pattern qu'Organization.openingHours : chaque field nom → method name.
81
+ * Les `updateXxx` méthodes ci-dessous délèguent toutes à `_updatePath`.
82
+ */
83
+ static CUSTOM_FIELD_HANDLERS: Map<"name" | "tags" | "startDate" | "endDate" | "links" | "status" | "credits" | "milestone" | "min" | "max" | "importance", {
84
+ readonly updateMethod: "updateName";
85
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
86
+ } | {
87
+ readonly updateMethod: "updateCredits";
88
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
89
+ } | {
90
+ readonly updateMethod: "updateMin";
91
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
92
+ } | {
93
+ readonly updateMethod: "updateMax";
94
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
95
+ } | {
96
+ readonly updateMethod: "updateStatus";
97
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
98
+ } | {
99
+ readonly updateMethod: "updateTags";
100
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
101
+ } | {
102
+ readonly updateMethod: "updateContributors";
103
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
104
+ } | {
105
+ readonly updateMethod: "updateStartDate";
106
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
107
+ } | {
108
+ readonly updateMethod: "updateEndDate";
109
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
110
+ } | {
111
+ readonly updateMethod: "updateMilestone";
112
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
113
+ } | {
114
+ readonly updateMethod: "updateImportance";
115
+ readonly schemaConstant: "VIRTUAL_ACTION_EDITABLE";
116
+ }>;
117
+ /**
118
+ * Champs présents dans le schéma de création (donc writable dans le draft) mais
119
+ * **non modifiables après création** — soit pas exposés en update backend, soit
120
+ * gérés par un autre flow.
121
+ *
122
+ * Si un caller modifie un de ces champs après get() puis save(), `_update` throw
123
+ * avec un message d'aide indiquant la voie alternative. Sans cette garde, le
124
+ * changement serait silencieusement ignoré.
125
+ */
126
+ private static CREATE_ONLY_FIELDS;
127
+ /**
128
+ * Slot UPDATE_BLOCKS vide pour l'instant : aucun endpoint dédié côté backend.
129
+ * Préservé pour cohérence structurelle avec Organization/Project — quand un endpoint
130
+ * `UPDATE_BLOCK_ACTION_XXX` arrivera, il s'ajoutera ici sans toucher au flow.
131
+ */
132
+ static UPDATE_BLOCKS: Map<string, string>;
133
+ /**
134
+ * `parentType` est injecté au payload de création (required par le schéma
135
+ * COSTUM_PROJECT_ACTION_REQUEST_NEW). `_add` ne filtre pas avec removeFields,
136
+ * donc il passe bien à la requête. Reste défensif si AJV `useDefaults` change.
137
+ */
19
138
  defaultFields: Record<string, any>;
139
+ /**
140
+ * Champs techniques exclus du draft writable (set au moment de la création,
141
+ * jamais modifiables ensuite par le caller). Restent accessibles en lecture
142
+ * via `action.serverData.parentId` / `.parentType`.
143
+ */
20
144
  removeFields: string[];
21
145
  _add: (payload: Record<string, any>) => Promise<void>;
22
146
  /**
@@ -24,4 +148,154 @@ export declare class Action extends BaseEntity<ActionItemNormalized> {
24
148
  * Méthode de bas niveau — utiliser `save()` après modification du draft à la place.
25
149
  */
26
150
  addAction(data?: Partial<CostumProjectActionRequestNewData>): Promise<unknown>;
151
+ _update: (payload: Record<string, any>) => Promise<boolean>;
152
+ updateName(value: string): Promise<unknown>;
153
+ /**
154
+ * Met à jour `credits` (entier). `setType: "int"` force le cast côté backend
155
+ * (form-urlencoded transmet en string sinon).
156
+ */
157
+ updateCredits(value: number): Promise<unknown>;
158
+ /** Met à jour `min` (entier ≥ 0). `setType: "int"`. */
159
+ updateMin(value: number): Promise<unknown>;
160
+ /** Met à jour `max` (entier ≥ 0). `setType: "int"`. */
161
+ updateMax(value: number): Promise<unknown>;
162
+ /**
163
+ * Change le statut de l'action via l'endpoint dédié backend `set_status`.
164
+ *
165
+ * **PAS via UPDATE_PATH_VALUE** : utiliser cet endpoint préserve la logique métier
166
+ * critique :
167
+ * - Ajoute une entrée dans `updateStatus[]` (historique des changements)
168
+ * - Auto endDate=now si status="done", auto startDate=now si "tracking"
169
+ * - Auto-purge des tags discuter/totest/next à la transition
170
+ * - Auto-set du tag pour discuter/next/totest (alias de "todo")
171
+ * - Notification Rocket.Chat au projet parent
172
+ *
173
+ * Statuses supportés côté backend : todo, done, tracking, discuter, next, totest, disabled, closed.
174
+ */
175
+ updateStatus(value: "todo" | "done" | "tracking" | "discuter" | "next" | "totest" | "disabled" | "closed"): Promise<unknown>;
176
+ updateTags(value: string[]): Promise<unknown>;
177
+ /**
178
+ * Met à jour `importance` ("low" / "medium" / "high" / autres valeurs custom).
179
+ * Champ simple sans effets de bord backend connus.
180
+ */
181
+ updateImportance(value: string): Promise<unknown>;
182
+ /**
183
+ * Remplace la liste complète des contributeurs via l'endpoint dédié `set_contributors`.
184
+ *
185
+ * **Sécurité** : touche plusieurs users → réservé aux admins du projet parent.
186
+ *
187
+ * Avantages vs UPDATE_PATH_VALUE :
188
+ * - Validation min/max côté backend (refus si hors bornes)
189
+ * - Notification socket aux autres clients (.set-contributors, .cd-int-contributors)
190
+ * - Réponse enrichie avec name/image des contributeurs
191
+ *
192
+ * @param value objet `{ contributors: { userId: {...} } }` — on extrait juste les keys (userIds).
193
+ * Les méta (type, isAdmin, name) sont gérées côté backend (type="citoyens" par défaut).
194
+ * Pour vider : passer `{ contributors: {} }`.
195
+ */
196
+ updateContributors(value: {
197
+ contributors?: Record<string, unknown>;
198
+ }): Promise<unknown>;
199
+ /**
200
+ * Ajoute un user comme contributeur de l'action (mode "join").
201
+ * Préserve les autres contributeurs existants.
202
+ *
203
+ * **Sécurité** :
204
+ * - Sans argument (ou userId = soi-même) → autorisé pour tout user connecté ("je participe")
205
+ * - Avec un autre userId → réservé aux admins du projet parent ("j'ajoute X")
206
+ *
207
+ * @param userId userId à ajouter. Par défaut : l'utilisateur connecté.
208
+ */
209
+ joinContributor(userId?: string): Promise<unknown>;
210
+ /**
211
+ * Retire un user de la liste des contributeurs (mode "quit").
212
+ * Préserve les autres contributeurs existants.
213
+ *
214
+ * **Sécurité** :
215
+ * - Sans argument (ou userId = soi-même) → autorisé pour tout user connecté ("je quitte")
216
+ * - Avec un autre userId → réservé aux admins du projet parent ("je retire X")
217
+ *
218
+ * @param userId userId à retirer. Par défaut : l'utilisateur connecté.
219
+ */
220
+ leaveContributor(userId?: string): Promise<unknown>;
221
+ /**
222
+ * Vérifie que l'utilisateur connecté est admin du projet parent — requis pour les
223
+ * mutations affectant des tiers (replace bulk ou agir sur un autre userId).
224
+ */
225
+ private _assertParentAdminForContributorMutation;
226
+ /**
227
+ * Met à jour ou efface le milestone d'une action.
228
+ * - `{ milestoneId }` : attache (validé via `Project.hasMilestone`).
229
+ * - `null` : détache via `$unset` Mongo côté backend.
230
+ *
231
+ * **Détail technique de l'effacement** :
232
+ * Le backend (`Element::updatePathValue`) fait `$verb = '$unset'` quand `$value === null`.
233
+ * Notre SDK strip les `null` avant l'envoi (`stripNullsInPlace`), donc on contourne en
234
+ * envoyant la chaîne vide `""` : la coercion PHP `(!empty($value) || $value == "0" || $value === false)`
235
+ * la transforme en `null` → `$unset`. Bonus : évite aussi le bug backend
236
+ * `"text" => $_POST["value"]` (accès direct, crash si value absent).
237
+ *
238
+ * NOTE: changer/effacer le milestone peut avoir des effets de bord côté backend non
239
+ * gérés (compteurs par milestone, idParentRoom, statuts dérivés). À utiliser avec discernement.
240
+ */
241
+ updateMilestone(value: {
242
+ milestoneId: string;
243
+ } | null): Promise<unknown>;
244
+ /**
245
+ * Met à jour startDate via l'endpoint dédié `set_date`.
246
+ *
247
+ * Utilise `set_date` plutôt qu'UPDATE_PATH_VALUE car :
248
+ * - Support natif de l'effacement : `null` → envoyer "" → backend fait `$unset`
249
+ * - Parser de date robuste côté backend (vs notre validation client-side)
250
+ *
251
+ * @param value chaîne ISO 8601 ("2026-05-20T08:00:00.000Z") ou null pour effacer.
252
+ */
253
+ updateStartDate(value: string | null): Promise<unknown>;
254
+ /**
255
+ * Met à jour endDate via l'endpoint dédié `set_date`.
256
+ * @param value chaîne ISO 8601 ou null pour effacer.
257
+ */
258
+ updateEndDate(value: string | null): Promise<unknown>;
259
+ /**
260
+ * Vérifie si l'utilisateur connecté est contributeur de CETTE action.
261
+ *
262
+ * Override la version de BaseEntity car la sémantique diffère :
263
+ * - Project : regarde `user.serverData.links.projects[projectId]` (sens user→project)
264
+ * - Action : regarde `action.serverData.links.contributors[userId]` (sens inverse)
265
+ *
266
+ * Pour modifier des données de l'action, c'est `parent.isAdmin()` qui compte
267
+ * (admin du projet parent) — pas cette méthode.
268
+ *
269
+ * @param options.silent si `false`, throw en cas de précondition manquante. Par défaut `true`.
270
+ */
271
+ isContributor(options?: {
272
+ silent?: boolean;
273
+ }): boolean;
274
+ /**
275
+ * Annule l'action via l'endpoint dédié `cancel`.
276
+ * Effets : status=closed + unset tracking + retire le tag "totest".
277
+ */
278
+ cancel(): Promise<unknown>;
279
+ /**
280
+ * Archive l'action via l'endpoint dédié `archive`.
281
+ * Effets : status=disabled + unset tracking.
282
+ */
283
+ archive(): Promise<unknown>;
284
+ /**
285
+ * Helper privé : envoie un UPDATE_PATH_VALUE pour un path donné.
286
+ */
287
+ private _updatePath;
288
+ /**
289
+ * Validation stricte int (refus float, NaN, etc.).
290
+ */
291
+ private _assertInt;
292
+ /**
293
+ * Validation stricte ISO 8601 (refus DD/MM/YYYY, "5 août", etc.). `null` accepté (clear).
294
+ */
295
+ private _assertIsoDate;
296
+ /**
297
+ * Vérifie un format ISO 8601 date-time strict (avec T et option timezone Z ou ±HH:MM).
298
+ */
299
+ private _isIsoDateTime;
300
+ form(): Promise<never>;
27
301
  }
@@ -20,4 +20,5 @@ export declare class Answer extends BaseEntity<AnswerItemNormalized> {
20
20
  * Constant : COFORM_ANSWERS_BY_ID
21
21
  */
22
22
  get(): Promise<Record<string, any>>;
23
+ form(): Promise<never>;
23
24
  }
@@ -21,4 +21,5 @@ export declare class Badge extends BaseEntity<any> {
21
21
  event(): Promise<never>;
22
22
  badge(): Promise<never>;
23
23
  news(): Promise<never>;
24
+ form(): Promise<never>;
24
25
  }
@@ -38,6 +38,9 @@ type NewsInput = {
38
38
  type ActionInput = {
39
39
  id: string;
40
40
  } | Record<string, any>;
41
+ type FormInput = {
42
+ id: string;
43
+ } | Record<string, any>;
41
44
  type ApiClient = import("../ApiClient.js").default;
42
45
  type EndpointApi = import("./EndpointApi.js").default;
43
46
  type User = import("./User.js").User;
@@ -57,6 +60,15 @@ type ParentLike = BaseEntity<any> & {
57
60
  apiClient: ApiClient;
58
61
  userContext?: User | null;
59
62
  };
63
+ /**
64
+ * Variantes d'endpoint disponibles pour `searchCostum`.
65
+ * Tous les variants doivent accepter le même schéma de requête/réponse que
66
+ * `GLOBAL_AUTOCOMPLETE_COSTUM` (drop-in remplacement).
67
+ *
68
+ * - `default` → `/co2/search/globalautocomplete`
69
+ * - `navigator-tl` → `/costum/navigator/gettl`
70
+ */
71
+ export type SearchCostumVariant = "default" | "navigator-tl";
60
72
  type EndpointApiCtor = {
61
73
  new (apiClient: ApiClient): EndpointApi;
62
74
  };
@@ -118,6 +130,8 @@ export type CostumContextFields = {
118
130
  costumSlug: string;
119
131
  contextId: string;
120
132
  contextType: EntityType;
133
+ costumId: string;
134
+ costumType: EntityType;
121
135
  sourceKey: string[];
122
136
  };
123
137
  export type WithCostumContext<T> = T & CostumContextFields;
@@ -143,6 +157,12 @@ export type PaginatorState = {
143
157
  index: number;
144
158
  history: PaginationCursor[];
145
159
  sizes: number[];
160
+ /**
161
+ * Métadonnées libres survivant à la sérialisation JSON. Permet aux méthodes paginées
162
+ * de stocker des paramètres spécifiques (ex. `variant` pour `searchCostum`) qui doivent
163
+ * être restaurés lors d'un `restorePaginationFromJSON`.
164
+ */
165
+ meta?: Record<string, unknown>;
146
166
  };
147
167
  export interface PaginatorPage<T> {
148
168
  count: {
@@ -317,6 +337,23 @@ export declare class BaseEntity<TServerData = any> {
317
337
  * @returns Données mises à jour
318
338
  */
319
339
  refresh(): Promise<Record<string, any>>;
340
+ /**
341
+ * Helper pour les entités enfants : refresh automatique APRÈS une mutation directe
342
+ * (méthode appelée hors flow `save()`). Skip si l'appel vient de `save()` qui refresh
343
+ * lui-même à la fin — détecté via le flag `_calledFromSave`.
344
+ *
345
+ * À appeler dans les méthodes publiques de mutation (ex: `Action.cancel()`,
346
+ * `Organization.updateOpeningHours()`) après l'opération réussie, pour que le caller
347
+ * trouve `entity.serverData` à jour sans avoir à appeler `refresh()` manuellement.
348
+ *
349
+ * @example
350
+ * async myMutation(): Promise<unknown> {
351
+ * const result = await this.endpointApi.someEndpoint({ ... });
352
+ * await this._refreshIfDirect();
353
+ * return result;
354
+ * }
355
+ */
356
+ protected _refreshIfDirect(): Promise<void>;
320
357
  /**
321
358
  * Sauvegarde les modifications locales vers le serveur (add ou update).
322
359
  * @returns Données serveur mises à jour (après éventuel `refresh()`)
@@ -1141,6 +1178,23 @@ export declare class BaseEntity<TServerData = any> {
1141
1178
  * @throws {ApiError} Sur les entités non supportées.
1142
1179
  */
1143
1180
  action(_actionData?: ActionInput): Promise<Action>;
1181
+ /**
1182
+ * Crée une instance de Form **dans le contexte costum de l'entité courante**.
1183
+ *
1184
+ * Méthode autorisée uniquement sur `Organization` et `Project` (les entités qui
1185
+ * portent un costumContext). Les autres entités la bloquent via un override
1186
+ * qui throw — cf. `User.form()`, `Event.form()`, `Poi.form()`, etc.
1187
+ *
1188
+ * @param formData - `{ id: string }` (Form n'a pas de slug)
1189
+ * @returns Le Form, déjà fetché (`get()` est appelé par `entity()` quand `id` est fourni).
1190
+ *
1191
+ * @example
1192
+ * const org = await api.organization({ slug: "navigatorDesTierslieux" });
1193
+ * const form = await org.form({ id: "6925e2b05dd63b02ca70d6d9" });
1194
+ * console.log(form.serverData.name); // "Coworking"
1195
+ * const answers = await form.getAnswers(); // utilise le costumContext de l'org
1196
+ */
1197
+ form(formData?: FormInput): Promise<Form>;
1144
1198
  /**
1145
1199
  * Récupérer les organisations d'une entitée : la liste des organisations dont l'entité est membre ou admin valide.
1146
1200
  * Constant : GET_ORGANIZATIONS_ADMIN | GET_ORGANIZATIONS_NO_ADMIN
@@ -1583,9 +1637,17 @@ export declare class BaseEntity<TServerData = any> {
1583
1637
  * const nextPage = await page.next();
1584
1638
  * console.log(nextPage.pageNumber, nextPage.results.length);
1585
1639
  * }
1640
+ *
1641
+ * @example
1642
+ * // Cibler l'endpoint navigator/gettl (mêmes paramètres et même format de réponse)
1643
+ * const page = await entity.searchCostum(
1644
+ * { name: "marseille", searchType: ["projects"] },
1645
+ * { variant: "navigator-tl" }
1646
+ * );
1586
1647
  */
1587
1648
  searchCostum(data?: Partial<GlobalAutocompleteCostumData>, options?: {
1588
1649
  restoredState?: PaginatorState;
1650
+ variant?: SearchCostumVariant;
1589
1651
  }): Promise<PaginatorPage<any>>;
1590
1652
  /**
1591
1653
  * @param data
@@ -24,6 +24,7 @@ export declare class Classified extends BaseEntity<ClassifiedItemNormalized> {
24
24
  badge(): Promise<never>;
25
25
  news(): Promise<never>;
26
26
  classified(): Promise<never>;
27
+ form(): Promise<never>;
27
28
  follow(): Promise<never>;
28
29
  unfollow(): Promise<never>;
29
30
  getGallery(): Promise<never>;
@@ -54,4 +54,5 @@ export declare class Comment extends BaseEntity<CommentItemNormalized> {
54
54
  reason: string;
55
55
  comment?: string;
56
56
  }): Promise<unknown>;
57
+ form(): Promise<never>;
57
58
  }
@@ -1,5 +1,5 @@
1
1
  import type ApiClient from "../ApiClient.js";
2
- import type { PersonRegisterData, AuthenticateUrlData, RefreshTokenUrlData, PasswordRecoveryData, ServerExchangeTokenData, ChangePasswordData, DeleteAccountData, UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, UpdateBlockSlugData, CheckData, ProfilImageData, ProfilBannerData, GetElementsAboutData, MulticonnectData, GetNewsData, GetNewsByIdData, AddNewsData, AddImageNewsData, AddFileNewsData, DeleteNewsData, UpdateNewsData, ShareNewsData, GetCommentsData, AddCommentsData, DeleteCommentsData, UpdateCommentsData, SearchTagsData, ShowVoteData, GlobalAutocompleteData, CityAutocompleteData, CityAutocompleteByCountryData, SuggestionInputData, GetProjectsNoAdminData, GetProjectsAdminData, GetPoisNoAdminData, GetPoisAdminData, GetOrganizationsNoAdminData, GetOrganizationsAdminData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, DisconnectData, GetElementsKeyData, GetFavorisData, DeleteFavorisData, AddFavorisData, AddOrganizationData, AddProjectData, AddPoiData, AddEventData, DeletePoiData, DeleteEventData, DeleteElementData, AddImageElementData, LinkValidateData, SearchMemberAutocompleteData, GetNotificationsData, GetNotificationsCountData, NotificationUpdateData, MarkNotificationAsReadData, ActivitypubSearchData, ActivitypubLinkData, ActivitypubGetCommunityData, GetBadgeData, AddBadgesData, AssignBadgesData, GetEventsData, ShareEventsData, InviteEventData, FollowData, GetCostumJsonData, GlobalAutocompleteCostumData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestDatesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetGalleryData, GetAttendeesNoAdminData, GetAttendeesAdminData, CoformAnswersSearchData, CoformAnswersByIdData, GetCoformByIdData, CoformUploadAnswerFileData, CoformGetAnswerFilesData, SaveCoformAnswerData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, GenerateAnswerFromFormData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData } from "./EndpointApi.types.js";
2
+ import type { PersonRegisterData, AuthenticateUrlData, RefreshTokenUrlData, PasswordRecoveryData, ServerExchangeTokenData, ChangePasswordData, DeleteAccountData, UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, UpdateBlockSlugData, CheckData, ProfilImageData, ProfilBannerData, GetElementsAboutData, MulticonnectData, GetNewsData, GetNewsByIdData, AddNewsData, AddImageNewsData, AddFileNewsData, DeleteNewsData, UpdateNewsData, ShareNewsData, GetCommentsData, AddCommentsData, DeleteCommentsData, UpdateCommentsData, SearchTagsData, ShowVoteData, GlobalAutocompleteData, CityAutocompleteData, CityAutocompleteByCountryData, SuggestionInputData, GetProjectsNoAdminData, GetProjectsAdminData, GetPoisNoAdminData, GetPoisAdminData, GetOrganizationsNoAdminData, GetOrganizationsAdminData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, DisconnectData, GetElementsKeyData, GetFavorisData, DeleteFavorisData, AddFavorisData, AddOrganizationData, AddProjectData, AddPoiData, AddEventData, DeletePoiData, DeleteEventData, DeleteElementData, AddImageElementData, LinkValidateData, SearchMemberAutocompleteData, GetNotificationsData, GetNotificationsCountData, NotificationUpdateData, MarkNotificationAsReadData, ActivitypubSearchData, ActivitypubLinkData, ActivitypubGetCommunityData, GetBadgeData, AddBadgesData, AssignBadgesData, GetEventsData, ShareEventsData, InviteEventData, FollowData, GetCostumJsonData, GlobalAutocompleteCostumData, NavigatorGettlData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestDatesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetGalleryData, GetAttendeesNoAdminData, GetAttendeesAdminData, CoformAnswersSearchData, CoformAnswersByIdData, GetCoformByIdData, CoformUploadAnswerFileData, CoformGetAnswerFilesData, SaveCoformAnswerData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, GenerateAnswerFromFormData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, CostumProjectActionRequestSetStatusData, CostumProjectActionRequestSetDateData, CostumProjectActionRequestSetContributorsData, CostumProjectActionRequestCancelData, CostumProjectActionRequestArchiveData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData } from "./EndpointApi.types.js";
3
3
  /**
4
4
  * Classe EndpointApi générée automatiquement depuis endpoints-copie.json
5
5
  */
@@ -891,6 +891,15 @@ export declare class EndpointApi {
891
891
  * @throws {Error} - En cas d'erreur inattendue.
892
892
  */
893
893
  globalAutocompleteCostum(data: GlobalAutocompleteCostumData): Promise<any>;
894
+ /**
895
+ * Navigator timeline (alias de globalautocomplete) : Recherche globale via navigator/gettl — schémas request/response identiques à GLOBAL_AUTOCOMPLETE_COSTUM
896
+ * Constant : NAVIGATOR_GETTL
897
+ * @param data - Données envoyées à l'API
898
+ * @returns Les données de réponse.
899
+ * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
900
+ * @throws {Error} - En cas d'erreur inattendue.
901
+ */
902
+ navigatorGettl(data: NavigatorGettlData): Promise<any>;
894
903
  /**
895
904
  * Récupérer les acteurs d'événement : Récupérer les acteurs (organizers, attendees, creators, animators) d'une entité événement.
896
905
  * Constant : COSTUM_EVENT_REQUEST_ACTORS
@@ -1181,6 +1190,56 @@ export declare class EndpointApi {
1181
1190
  * @throws {Error} - En cas d'erreur inattendue.
1182
1191
  */
1183
1192
  costumProjectActionRequestNew(data: CostumProjectActionRequestNewData): Promise<any>;
1193
+ /**
1194
+ * Change le statut d'une action (avec logique métier) : Change le status d'une action via l'endpoint dédié backend. Ajoute une entrée à updateStatus[], gère les tags (discuter/totest/next), auto-injecte startDate/endDate selon le status, gère tracking, envoie une notification Rocket.Chat au parent. NE PAS confondre avec UPDATE_PATH_VALUE qui bypass toute cette logique.
1195
+ * Constant : COSTUM_PROJECT_ACTION_REQUEST_SET_STATUS
1196
+ * @param data - Données envoyées à l'API
1197
+ * @returns Les données de réponse.
1198
+ * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
1199
+ * @throws {ApiAuthenticationError} - En cas d'erreur d'authentification.
1200
+ * @throws {Error} - En cas d'erreur inattendue.
1201
+ */
1202
+ costumProjectActionRequestSetStatus(data: CostumProjectActionRequestSetStatusData): Promise<any>;
1203
+ /**
1204
+ * Met à jour les dates d'une action : Met à jour startDate et/ou endDate d'une action via l'endpoint dédié. Supporte nativement l'effacement (envoyer chaîne vide → $unset). Parser de date robuste côté backend.
1205
+ * Constant : COSTUM_PROJECT_ACTION_REQUEST_SET_DATE
1206
+ * @param data - Données envoyées à l'API
1207
+ * @returns Les données de réponse.
1208
+ * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
1209
+ * @throws {ApiAuthenticationError} - En cas d'erreur d'authentification.
1210
+ * @throws {Error} - En cas d'erreur inattendue.
1211
+ */
1212
+ costumProjectActionRequestSetDate(data: CostumProjectActionRequestSetDateData): Promise<any>;
1213
+ /**
1214
+ * Définit les contributeurs d'une action : Modifie links.contributors d'une action via 3 modes : (A) `contributors` array de userIds = remplace toute la liste ; (B) `contributor` + `participate=1` = ajoute un user ; (C) `contributor` + `participate=0` = retire un user. Valide les bornes `min`/`max` côté backend. Émet `.set-contributors{parentId}` et `.cd-int-contributors` aux clients socket.
1215
+ * Constant : COSTUM_PROJECT_ACTION_REQUEST_SET_CONTRIBUTORS
1216
+ * @param data - Données envoyées à l'API
1217
+ * @returns Les données de réponse.
1218
+ * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
1219
+ * @throws {ApiAuthenticationError} - En cas d'erreur d'authentification.
1220
+ * @throws {Error} - En cas d'erreur inattendue.
1221
+ */
1222
+ costumProjectActionRequestSetContributors(data: CostumProjectActionRequestSetContributorsData): Promise<any>;
1223
+ /**
1224
+ * Annule une action : Annule une action : status=closed + unset tracking + retire le tag 'totest'.
1225
+ * Constant : COSTUM_PROJECT_ACTION_REQUEST_CANCEL
1226
+ * @param data - Données envoyées à l'API
1227
+ * @returns Les données de réponse.
1228
+ * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
1229
+ * @throws {ApiAuthenticationError} - En cas d'erreur d'authentification.
1230
+ * @throws {Error} - En cas d'erreur inattendue.
1231
+ */
1232
+ costumProjectActionRequestCancel(data: CostumProjectActionRequestCancelData): Promise<any>;
1233
+ /**
1234
+ * Archive une action : Archive une action : status=disabled + unset tracking.
1235
+ * Constant : COSTUM_PROJECT_ACTION_REQUEST_ARCHIVE
1236
+ * @param data - Données envoyées à l'API
1237
+ * @returns Les données de réponse.
1238
+ * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
1239
+ * @throws {ApiAuthenticationError} - En cas d'erreur d'authentification.
1240
+ * @throws {Error} - En cas d'erreur inattendue.
1241
+ */
1242
+ costumProjectActionRequestArchive(data: CostumProjectActionRequestArchiveData): Promise<any>;
1184
1243
  /**
1185
1244
  * Interoperabilité Discourse Lié un compte : Lier un compte Discourse
1186
1245
  * Constant : LINK_DISCOURSE_ACCOUNT