@communecter/cocolight-api-client 1.0.152 → 1.0.154

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 (40) hide show
  1. package/dist/cocolight-api-client.browser.js +1 -1
  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/BaseEntity.ts +7 -1
  8. package/src/api/EndpointApi.types.ts +11 -3
  9. package/src/endpoints.module.ts +1 -1
  10. package/types/api/BaseEntity.d.ts +1 -1
  11. package/types/api/EndpointApi.types.d.ts +11 -3
  12. package/types/endpoints.module.d.ts +278 -5
  13. package/dist/203.cocolight-api-client.cjs +0 -1
  14. package/dist/278.cocolight-api-client.browser.js +0 -1
  15. package/dist/278.cocolight-api-client.cjs +0 -1
  16. package/dist/278.cocolight-api-client.mjs.js +0 -1
  17. package/dist/320.cocolight-api-client.browser.js +0 -1
  18. package/dist/401.cocolight-api-client.browser.js +0 -1
  19. package/dist/401.cocolight-api-client.cjs +0 -1
  20. package/dist/401.cocolight-api-client.mjs.js +0 -1
  21. package/dist/407.cocolight-api-client.browser.js +0 -1
  22. package/dist/407.cocolight-api-client.mjs.js +0 -1
  23. package/dist/499.cocolight-api-client.browser.js +0 -1
  24. package/dist/499.cocolight-api-client.cjs +0 -1
  25. package/dist/499.cocolight-api-client.mjs.js +0 -1
  26. package/dist/556.cocolight-api-client.browser.js +0 -1
  27. package/dist/556.cocolight-api-client.cjs +0 -1
  28. package/dist/556.cocolight-api-client.mjs.js +0 -1
  29. package/dist/593.cocolight-api-client.browser.js +0 -1
  30. package/dist/593.cocolight-api-client.cjs +0 -1
  31. package/dist/593.cocolight-api-client.mjs.js +0 -1
  32. package/dist/839.cocolight-api-client.browser.js +0 -1
  33. package/dist/839.cocolight-api-client.cjs +0 -1
  34. package/dist/839.cocolight-api-client.mjs.js +0 -1
  35. package/dist/85.cocolight-api-client.browser.js +0 -1
  36. package/dist/85.cocolight-api-client.cjs +0 -1
  37. package/dist/85.cocolight-api-client.mjs.js +0 -1
  38. package/dist/906.cocolight-api-client.browser.js +0 -1
  39. package/dist/906.cocolight-api-client.cjs +0 -1
  40. package/dist/906.cocolight-api-client.mjs.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@communecter/cocolight-api-client",
3
- "version": "1.0.152",
3
+ "version": "1.0.154",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
@@ -5486,6 +5486,11 @@ export class BaseEntity<TServerData = any> {
5486
5486
  id: this.id,
5487
5487
  type: this.getEntityType()
5488
5488
  },
5489
+ // `element_event` lit son id/type dans le BODY (EventAction::run ignore le $id du path et lit
5490
+ // $_POST["id"]/$_POST["type"]). Bug corrigé : avant, seuls les pathParams partaient -> body vide
5491
+ // -> get_events([]) -> []. On injecte id/type en body (surchargeables via `data` pour cibler un autre élément).
5492
+ id: this.id,
5493
+ type: this.getEntityType(),
5489
5494
  ...data
5490
5495
  };
5491
5496
 
@@ -5606,7 +5611,8 @@ export class BaseEntity<TServerData = any> {
5606
5611
  * @throws {ApiResponseError}
5607
5612
  * @throws {Error}
5608
5613
  */
5609
- async costumEventRequestLoadContextTag(data: Partial<Omit<CostumEventRequestLoadContextTagData, "pathParams">> = {}): Promise<unknown> {
5614
+ // `event` est REQUIS : le legacy fait `new MongoId($_POST['event'])` (EventAction:64-68) qui throw si absent.
5615
+ async costumEventRequestLoadContextTag(data: Partial<Omit<CostumEventRequestLoadContextTagData, "pathParams" | "event">> & Pick<CostumEventRequestLoadContextTagData, "event">): Promise<unknown> {
5610
5616
 
5611
5617
  if (!this.id) {
5612
5618
  throw new ApiError(`${this.constructor.name} non enregistrée.`, 404);
@@ -4295,9 +4295,9 @@ export interface InviteEventData {
4295
4295
  */
4296
4296
  name: string;
4297
4297
  /**
4298
- * Email de l'utilisateur
4298
+ * Email de l'invité (clé `mail` — le legacy Link::invite lit $value['mail'])
4299
4299
  */
4300
- email: string;
4300
+ mail: string;
4301
4301
  /**
4302
4302
  * Message d'invitation
4303
4303
  */
@@ -4886,6 +4886,14 @@ export interface CostumEventRequestSubeventsData {
4886
4886
 
4887
4887
 
4888
4888
  export interface CostumEventRequestElementEventData {
4889
+ /**
4890
+ * ID de l’élément dont on récupère les événements liés (lu dans le BODY — EventAction::run element_event lit $_POST["id"], ignore le path)
4891
+ */
4892
+ id?: string;
4893
+ /**
4894
+ * Type/collection de l’élément (lu dans le BODY — $_POST["type"])
4895
+ */
4896
+ type?: string;
4889
4897
  /**
4890
4898
  * ID du contexte de recherche (actuellement vide)
4891
4899
  */
@@ -5155,7 +5163,7 @@ export interface CostumEventRequestLoadContextTagData {
5155
5163
  /**
5156
5164
  * ID de l’événement
5157
5165
  */
5158
- event?: string;
5166
+ event: string;
5159
5167
  /**
5160
5168
  * Recherche textuelle dans les tags
5161
5169
  */