@communecter/cocolight-api-client 1.0.30 → 1.0.31

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": "@communecter/cocolight-api-client",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
package/src/api/Badge.js CHANGED
@@ -4,6 +4,8 @@ import BaseEntity from "./BaseEntity.js";
4
4
  export class Badge extends BaseEntity {
5
5
  static entityType = "badges";
6
6
 
7
+ static entityTag = "Badge";
8
+
7
9
  static SCHEMA_CONSTANTS = [
8
10
  "ADD_BADGES",
9
11
  ];
@@ -34,6 +34,8 @@ export class BaseEntity {
34
34
  /** @type {boolean} Indique si le draft est synchronisé avec le serveur */
35
35
  _syncReactiveDraft = false;
36
36
 
37
+ static entityTag = "BaseEntity";
38
+
37
39
  /**
38
40
  * Constructeur de l'entité.
39
41
  * @param {Object} parent - L'ApiClient ou une entité parente.
@@ -54,7 +56,7 @@ export class BaseEntity {
54
56
  * @throws {ApiError} Si les dépendances ou parent sont invalides.
55
57
  */
56
58
  constructor(parent, data = {}, deps = {}, config = {}) {
57
- this.__entityTag = config.entityTag || this.getEntityTag(this.constructor.name) || "BaseEntity";
59
+ this.__entityTag = config.entityTag || this.getEntityTag(this.constructor.entityTag) || "BaseEntity";
58
60
  this.deps = deps;
59
61
 
60
62
  if (this.getEntityTag(parent?.__entityTag) === "ApiClient") {
@@ -971,25 +971,6 @@ export interface GlobalAutocompleteData {
971
971
  * Balises (tags) à utiliser pour filtrer la recherche
972
972
  */
973
973
  searchTags?: string[];
974
- /**
975
- * Configuration des plages de résultats pour chaque type de recherche
976
- */
977
- ranges?: {
978
- /**
979
- * This interface was referenced by `undefined`'s JSON-Schema definition
980
- * via the `patternProperty` "^[^\s]+$".
981
- */
982
- [k: string]: {
983
- /**
984
- * Index de départ pour la pagination
985
- */
986
- indexMin: number;
987
- /**
988
- * Index de fin pour la pagination
989
- */
990
- indexMax: number;
991
- };
992
- };
993
974
  /**
994
975
  * Liste fixe des types à compter dans les résultats
995
976
  */
@@ -1004,13 +985,40 @@ export interface GlobalAutocompleteData {
1004
985
  | "poi"
1005
986
  )[];
1006
987
  /**
1007
- * Index de départ global pour la pagination
988
+ * Critère de recherche (actuellement vide)
1008
989
  */
1009
- indexMin: 0;
990
+ searchBy?: "ALL";
991
+ /**
992
+ * Index de départ global pour la pagination (toujours 0)
993
+ */
994
+ indexMin: number;
995
+ /**
996
+ * Index de fin global pour la pagination
997
+ */
998
+ indexMax?: number;
1010
999
  /**
1011
1000
  * Nombre d’éléments à récupérer (limite de pagination)
1012
1001
  */
1013
1002
  indexStep: number;
1003
+ /**
1004
+ * Configuration des plages de résultats pour chaque type de recherche
1005
+ */
1006
+ ranges?: {
1007
+ /**
1008
+ * This interface was referenced by `undefined`'s JSON-Schema definition
1009
+ * via the `patternProperty` "^[^\s]+$".
1010
+ */
1011
+ [k: string]: {
1012
+ /**
1013
+ * Index de départ pour la pagination
1014
+ */
1015
+ indexMin: number;
1016
+ /**
1017
+ * Index de fin pour la pagination
1018
+ */
1019
+ indexMax: number;
1020
+ };
1021
+ };
1014
1022
  /**
1015
1023
  * Type initial de la recherche, vide par défaut
1016
1024
  */
package/src/api/Event.js CHANGED
@@ -4,6 +4,8 @@ import BaseEntity from "./BaseEntity.js";
4
4
  export class Event extends BaseEntity {
5
5
  static entityType = "events";
6
6
 
7
+ static entityTag = "Event";
8
+
7
9
  static SCHEMA_CONSTANTS = [
8
10
  "ADD_EVENT",
9
11
  // "UPDATE_BLOCK_DESCRIPTION",
package/src/api/News.js CHANGED
@@ -4,6 +4,8 @@ import BaseEntity from "./BaseEntity.js";
4
4
  export class News extends BaseEntity {
5
5
  static entityType = "news";
6
6
 
7
+ static entityTag = "News";
8
+
7
9
  static SCHEMA_CONSTANTS = [
8
10
  "ADD_NEWS"
9
11
  ];
@@ -4,6 +4,8 @@ import BaseEntity from "./BaseEntity.js";
4
4
  export class Organization extends BaseEntity {
5
5
  static entityType = "organizations";
6
6
 
7
+ static entityTag = "Organization";
8
+
7
9
  static SCHEMA_CONSTANTS = [
8
10
  "ADD_ORGANIZATION",
9
11
  "UPDATE_BLOCK_DESCRIPTION",
package/src/api/Poi.js CHANGED
@@ -4,6 +4,8 @@ import BaseEntity from "./BaseEntity.js";
4
4
  export class Poi extends BaseEntity {
5
5
  static entityType = "poi";
6
6
 
7
+ static entityTag = "Poi";
8
+
7
9
  static SCHEMA_CONSTANTS = [
8
10
  "ADD_POI",
9
11
  "UPDATE_BLOCK_DESCRIPTION",
@@ -4,6 +4,8 @@ import BaseEntity from "./BaseEntity.js";
4
4
  export class Project extends BaseEntity {
5
5
  static entityType = "projects";
6
6
 
7
+ static entityTag = "Project";
8
+
7
9
  static SCHEMA_CONSTANTS = [
8
10
  "ADD_PROJECT",
9
11
  "UPDATE_BLOCK_DESCRIPTION",
package/src/api/User.js CHANGED
@@ -7,6 +7,8 @@ export class User extends BaseEntity {
7
7
 
8
8
  static entityType = "citoyens";
9
9
 
10
+ static entityTag = "User";
11
+
10
12
  static SCHEMA_CONSTANTS = [
11
13
  "UPDATE_BLOCK_DESCRIPTION",
12
14
  "UPDATE_BLOCK_INFO",