@communecter/cocolight-api-client 1.0.150 → 1.0.151

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.150",
3
+ "version": "1.0.151",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,7 +45,8 @@
45
45
  "generate:module:publish": "node ./scripts/transform-json-module.publish.js",
46
46
  "generate:doc": "node ./scripts/generate-doc.js",
47
47
  "generate:reponses": "node ./scripts/generate-constant-response-200.js",
48
- "generate:methodeapi": "node ./scripts/generate-methode-api.js"
48
+ "generate:methodeapi": "node ./scripts/generate-methode-api.js",
49
+ "generate:costum": "node ./scripts/generate-costum-extensions.js"
49
50
  },
50
51
  "keywords": [
51
52
  "communecter",
@@ -803,7 +803,11 @@ export class BaseEntity<TServerData = any> {
803
803
  const v = fullData[key];
804
804
  const isClear = v === null || v === "" || (Array.isArray(v) && v.length === 0);
805
805
  changed[key] = isClear ? "" : v; // clear → "" : survit à stripNulls, backend prepElementData → $unset
806
- props[key] = this._lookupPropSchema(combined, key) ?? (costumProps[key] as unknown) ?? {};
806
+ // Schéma porté dans l'enveloppe (validation AJV de requête). Pour un EFFACEMENT, on envoie le sentinel
807
+ // "" : le schéma STRICT du champ (ex. socialNetwork = objet, openingHours = array) rejetterait "" →
808
+ // "Request validation failed". On porte donc un schéma PERMISSIF ({}) pour la clé effacée (le "" est le
809
+ // sentinel voulu ; le backend prepElementData fait le $unset). Sinon, schéma réel du champ.
810
+ props[key] = isClear ? {} : (this._lookupPropSchema(combined, key) ?? (costumProps[key] as unknown) ?? {});
807
811
  }
808
812
 
809
813
  let didSave = false;
@@ -2782,7 +2782,7 @@ export interface AddOrganizationData {
2782
2782
  * Rôle principal de l’organisation
2783
2783
  */
2784
2784
  role: "admin" | "member";
2785
- tags?: string[];
2785
+ tags?: "" | string[];
2786
2786
  /**
2787
2787
  * Email de l’organisation
2788
2788
  */
@@ -2806,35 +2806,33 @@ export interface AddOrganizationData {
2806
2806
  isOpenEdition: boolean;
2807
2807
  [k: string]: unknown;
2808
2808
  };
2809
- /**
2810
- * Coordonnées géographiques
2811
- */
2812
- geo?: {
2813
- "@type"?: "GeoCoordinates";
2814
- latitude: string | number;
2815
- longitude: string | number;
2816
- };
2817
- /**
2818
- * Position géographique GeoJSON
2819
- */
2820
- geoPosition?: {
2821
- /**
2822
- * Type GeoJSON (doit être 'Point')
2823
- */
2824
- type: "Point";
2825
- /**
2826
- * Tableau contenant [longitude, latitude]
2827
- *
2828
- * @minItems 2
2829
- * @maxItems 2
2830
- */
2831
- coordinates: [number, number];
2832
- /**
2833
- * Indicateur pour forcer la conversion en float côté serveur
2834
- */
2835
- float: true;
2836
- [k: string]: unknown;
2837
- };
2809
+ geo?:
2810
+ | ""
2811
+ | {
2812
+ "@type"?: "GeoCoordinates";
2813
+ latitude: string | number;
2814
+ longitude: string | number;
2815
+ };
2816
+ geoPosition?:
2817
+ | ""
2818
+ | {
2819
+ /**
2820
+ * Type GeoJSON (doit être 'Point')
2821
+ */
2822
+ type: "Point";
2823
+ /**
2824
+ * Tableau contenant [longitude, latitude]
2825
+ *
2826
+ * @minItems 2
2827
+ * @maxItems 2
2828
+ */
2829
+ coordinates: [number, number];
2830
+ /**
2831
+ * Indicateur pour forcer la conversion en float côté serveur
2832
+ */
2833
+ float?: true;
2834
+ [k: string]: unknown;
2835
+ };
2838
2836
  /**
2839
2837
  * Thématiques de l’organisation
2840
2838
  */
@@ -2849,33 +2847,35 @@ export interface AddOrganizationData {
2849
2847
  tags: string[];
2850
2848
  };
2851
2849
  };
2852
- address?: {
2853
- "@type": "PostalAddress";
2854
- addressCountry: string;
2855
- codeInsee: string;
2856
- addressLocality: string;
2857
- localityId: string;
2858
- level1: string;
2859
- level1Name: string;
2860
- /**
2861
- * ID du département. Peut être vide pour les pays étrangers.
2862
- */
2863
- level3?: string;
2864
- /**
2865
- * Nom du département. Peut être vide pour les pays étrangers.
2866
- */
2867
- level3Name?: string;
2868
- /**
2869
- * ID de la commune. Peut être vide pour les pays étrangers.
2870
- */
2871
- level4?: string;
2872
- /**
2873
- * Nom de la commune. Peut être vide pour les pays étrangers.
2874
- */
2875
- level4Name?: string;
2876
- postalCode?: string;
2877
- streetAddress?: string;
2878
- };
2850
+ address?:
2851
+ | ""
2852
+ | {
2853
+ "@type": "PostalAddress";
2854
+ addressCountry: string;
2855
+ codeInsee: string;
2856
+ addressLocality: string;
2857
+ localityId: string;
2858
+ level1: string;
2859
+ level1Name: string;
2860
+ /**
2861
+ * ID du département. Peut être vide pour les pays étrangers.
2862
+ */
2863
+ level3?: string;
2864
+ /**
2865
+ * Nom du département. Peut être vide pour les pays étrangers.
2866
+ */
2867
+ level3Name?: string;
2868
+ /**
2869
+ * ID de la commune. Peut être vide pour les pays étrangers.
2870
+ */
2871
+ level4?: string;
2872
+ /**
2873
+ * Nom de la commune. Peut être vide pour les pays étrangers.
2874
+ */
2875
+ level4Name?: string;
2876
+ postalCode?: string;
2877
+ streetAddress?: string;
2878
+ };
2879
2879
  scope: "";
2880
2880
  /**
2881
2881
  * Horaires d'ouverture (7 entrées, une par jour de la semaine ; "" pour un jour fermé). Doit rester synchronisé avec VIRTUAL_OPENING_HOURS dans Organization.ts.
@@ -3102,7 +3102,7 @@ export interface AddProjectData {
3102
3102
  * Visibilité (true/false)
3103
3103
  */
3104
3104
  public: boolean;
3105
- tags?: string[];
3105
+ tags?: "" | string[];
3106
3106
  /**
3107
3107
  * Description courte
3108
3108
  */
@@ -3126,62 +3126,62 @@ export interface AddProjectData {
3126
3126
  crowdfunding?: boolean;
3127
3127
  [k: string]: unknown;
3128
3128
  };
3129
- /**
3130
- * Coordonnées géographiques
3131
- */
3132
- geo?: {
3133
- "@type"?: "GeoCoordinates";
3134
- latitude: string | number;
3135
- longitude: string | number;
3136
- };
3137
- /**
3138
- * Position géographique GeoJSON
3139
- */
3140
- geoPosition?: {
3141
- /**
3142
- * Type GeoJSON (doit être 'Point')
3143
- */
3144
- type: "Point";
3145
- /**
3146
- * Tableau contenant [longitude, latitude]
3147
- *
3148
- * @minItems 2
3149
- * @maxItems 2
3150
- */
3151
- coordinates: [number, number];
3152
- /**
3153
- * Indicateur pour forcer la conversion en float côté serveur
3154
- */
3155
- float: true;
3156
- [k: string]: unknown;
3157
- };
3158
- address?: {
3159
- "@type": "PostalAddress";
3160
- addressCountry: string;
3161
- codeInsee: string;
3162
- addressLocality: string;
3163
- localityId: string;
3164
- level1: string;
3165
- level1Name: string;
3166
- /**
3167
- * ID du département. Peut être vide pour les pays étrangers.
3168
- */
3169
- level3?: string;
3170
- /**
3171
- * Nom du département. Peut être vide pour les pays étrangers.
3172
- */
3173
- level3Name?: string;
3174
- /**
3175
- * ID de la commune. Peut être vide pour les pays étrangers.
3176
- */
3177
- level4?: string;
3178
- /**
3179
- * Nom de la commune. Peut être vide pour les pays étrangers.
3180
- */
3181
- level4Name?: string;
3182
- postalCode?: string;
3183
- streetAddress?: string;
3184
- };
3129
+ geo?:
3130
+ | ""
3131
+ | {
3132
+ "@type"?: "GeoCoordinates";
3133
+ latitude: string | number;
3134
+ longitude: string | number;
3135
+ };
3136
+ geoPosition?:
3137
+ | ""
3138
+ | {
3139
+ /**
3140
+ * Type GeoJSON (doit être 'Point')
3141
+ */
3142
+ type: "Point";
3143
+ /**
3144
+ * Tableau contenant [longitude, latitude]
3145
+ *
3146
+ * @minItems 2
3147
+ * @maxItems 2
3148
+ */
3149
+ coordinates: [number, number];
3150
+ /**
3151
+ * Indicateur pour forcer la conversion en float côté serveur
3152
+ */
3153
+ float?: true;
3154
+ [k: string]: unknown;
3155
+ };
3156
+ address?:
3157
+ | ""
3158
+ | {
3159
+ "@type": "PostalAddress";
3160
+ addressCountry: string;
3161
+ codeInsee: string;
3162
+ addressLocality: string;
3163
+ localityId: string;
3164
+ level1: string;
3165
+ level1Name: string;
3166
+ /**
3167
+ * ID du département. Peut être vide pour les pays étrangers.
3168
+ */
3169
+ level3?: string;
3170
+ /**
3171
+ * Nom du département. Peut être vide pour les pays étrangers.
3172
+ */
3173
+ level3Name?: string;
3174
+ /**
3175
+ * ID de la commune. Peut être vide pour les pays étrangers.
3176
+ */
3177
+ level4?: string;
3178
+ /**
3179
+ * Nom de la commune. Peut être vide pour les pays étrangers.
3180
+ */
3181
+ level4Name?: string;
3182
+ postalCode?: string;
3183
+ streetAddress?: string;
3184
+ };
3185
3185
  scope: "";
3186
3186
  [k: string]: unknown;
3187
3187
  }
@@ -3261,67 +3261,67 @@ export interface AddPoiData {
3261
3261
  * Description
3262
3262
  */
3263
3263
  description?: string;
3264
- tags?: string[];
3264
+ tags?: "" | string[];
3265
3265
  /**
3266
3266
  * URLs externes associées
3267
3267
  */
3268
3268
  urls?: string[];
3269
- /**
3270
- * Coordonnées géographiques
3271
- */
3272
- geo?: {
3273
- "@type"?: "GeoCoordinates";
3274
- latitude: string | number;
3275
- longitude: string | number;
3276
- };
3277
- /**
3278
- * Position géographique GeoJSON
3279
- */
3280
- geoPosition?: {
3281
- /**
3282
- * Type GeoJSON (doit être 'Point')
3283
- */
3284
- type: "Point";
3285
- /**
3286
- * Tableau contenant [longitude, latitude]
3287
- *
3288
- * @minItems 2
3289
- * @maxItems 2
3290
- */
3291
- coordinates: [number, number];
3292
- /**
3293
- * Indicateur pour forcer la conversion en float côté serveur
3294
- */
3295
- float: true;
3296
- [k: string]: unknown;
3297
- };
3298
- address?: {
3299
- "@type": "PostalAddress";
3300
- addressCountry: string;
3301
- codeInsee: string;
3302
- addressLocality: string;
3303
- localityId: string;
3304
- level1: string;
3305
- level1Name: string;
3306
- /**
3307
- * ID du département. Peut être vide pour les pays étrangers.
3308
- */
3309
- level3?: string;
3310
- /**
3311
- * Nom du département. Peut être vide pour les pays étrangers.
3312
- */
3313
- level3Name?: string;
3314
- /**
3315
- * ID de la commune. Peut être vide pour les pays étrangers.
3316
- */
3317
- level4?: string;
3318
- /**
3319
- * Nom de la commune. Peut être vide pour les pays étrangers.
3320
- */
3321
- level4Name?: string;
3322
- postalCode?: string;
3323
- streetAddress?: string;
3324
- };
3269
+ geo?:
3270
+ | ""
3271
+ | {
3272
+ "@type"?: "GeoCoordinates";
3273
+ latitude: string | number;
3274
+ longitude: string | number;
3275
+ };
3276
+ geoPosition?:
3277
+ | ""
3278
+ | {
3279
+ /**
3280
+ * Type GeoJSON (doit être 'Point')
3281
+ */
3282
+ type: "Point";
3283
+ /**
3284
+ * Tableau contenant [longitude, latitude]
3285
+ *
3286
+ * @minItems 2
3287
+ * @maxItems 2
3288
+ */
3289
+ coordinates: [number, number];
3290
+ /**
3291
+ * Indicateur pour forcer la conversion en float côté serveur
3292
+ */
3293
+ float?: true;
3294
+ [k: string]: unknown;
3295
+ };
3296
+ address?:
3297
+ | ""
3298
+ | {
3299
+ "@type": "PostalAddress";
3300
+ addressCountry: string;
3301
+ codeInsee: string;
3302
+ addressLocality: string;
3303
+ localityId: string;
3304
+ level1: string;
3305
+ level1Name: string;
3306
+ /**
3307
+ * ID du département. Peut être vide pour les pays étrangers.
3308
+ */
3309
+ level3?: string;
3310
+ /**
3311
+ * Nom du département. Peut être vide pour les pays étrangers.
3312
+ */
3313
+ level3Name?: string;
3314
+ /**
3315
+ * ID de la commune. Peut être vide pour les pays étrangers.
3316
+ */
3317
+ level4?: string;
3318
+ /**
3319
+ * Nom de la commune. Peut être vide pour les pays étrangers.
3320
+ */
3321
+ level4Name?: string;
3322
+ postalCode?: string;
3323
+ streetAddress?: string;
3324
+ };
3325
3325
  scope?: "";
3326
3326
  [k: string]: unknown;
3327
3327
  }
@@ -3611,35 +3611,33 @@ export interface AddEventData {
3611
3611
  }
3612
3612
  )
3613
3613
  ];
3614
- /**
3615
- * Coordonnées géographiques
3616
- */
3617
- geo?: {
3618
- "@type"?: "GeoCoordinates";
3619
- latitude: string | number;
3620
- longitude: string | number;
3621
- };
3622
- /**
3623
- * Position géographique GeoJSON
3624
- */
3625
- geoPosition?: {
3626
- /**
3627
- * Type GeoJSON (doit être 'Point')
3628
- */
3629
- type: "Point";
3630
- /**
3631
- * Tableau contenant [longitude, latitude]
3632
- *
3633
- * @minItems 2
3634
- * @maxItems 2
3635
- */
3636
- coordinates: [number, number];
3637
- /**
3638
- * Indicateur pour forcer la conversion en float côté serveur
3639
- */
3640
- float: true;
3641
- [k: string]: unknown;
3642
- };
3614
+ geo?:
3615
+ | ""
3616
+ | {
3617
+ "@type"?: "GeoCoordinates";
3618
+ latitude: string | number;
3619
+ longitude: string | number;
3620
+ };
3621
+ geoPosition?:
3622
+ | ""
3623
+ | {
3624
+ /**
3625
+ * Type GeoJSON (doit être 'Point')
3626
+ */
3627
+ type: "Point";
3628
+ /**
3629
+ * Tableau contenant [longitude, latitude]
3630
+ *
3631
+ * @minItems 2
3632
+ * @maxItems 2
3633
+ */
3634
+ coordinates: [number, number];
3635
+ /**
3636
+ * Indicateur pour forcer la conversion en float côté serveur
3637
+ */
3638
+ float?: true;
3639
+ [k: string]: unknown;
3640
+ };
3643
3641
  address?:
3644
3642
  | ""
3645
3643
  | {