@communecter/cocolight-api-client 1.0.95 → 1.0.97

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.
@@ -2836,7 +2836,7 @@ export interface AddEventData {
2836
2836
  };
2837
2837
  };
2838
2838
  /**
2839
- * Objet contenant les entités parentes (clé = ID). null signifie que les parents ne sont pas modifiés.
2839
+ * Objet contenant les entités parentes (clé = ID), ou chaîne vide "" pour effacer les parents.
2840
2840
  */
2841
2841
  parent?: {
2842
2842
  /**
@@ -2853,7 +2853,7 @@ export interface AddEventData {
2853
2853
  */
2854
2854
  name?: string;
2855
2855
  };
2856
- };
2856
+ } | "";
2857
2857
  /**
2858
2858
  * Nom de l'événement
2859
2859
  */
@@ -1,6 +1,7 @@
1
1
  import { BaseEntity } from "./BaseEntity.js";
2
+ import { PoiItemNormalized } from "./serverDataType/Poi.js";
2
3
  import type { AddPoiData } from "./EndpointApi.types.js";
3
- export declare class Poi extends BaseEntity<any> {
4
+ export declare class Poi extends BaseEntity<PoiItemNormalized> {
4
5
  static entityType: string;
5
6
  static entityTag: string;
6
7
  static SCHEMA_CONSTANTS: string[];
@@ -21,13 +22,13 @@ export declare class Poi extends BaseEntity<any> {
21
22
  *
22
23
  * Récupère les actualités du POI.
23
24
  */
24
- getNews(data?: Parameters<BaseEntity<any>["getNews"]>[0]): Promise<import("./News.js").News[]>;
25
+ getNews(): Promise<never>;
25
26
  /**
26
27
  * {@inheritDoc BaseEntity#getSubscribers}
27
28
  *
28
29
  * Récupère les abonnés du POI.
29
30
  */
30
- getSubscribers(data?: Parameters<BaseEntity<any>["getSubscribers"]>[0]): Promise<import("./BaseEntity.js").PaginatorPage<import("./User.js").User>>;
31
+ getSubscribers(data?: Parameters<BaseEntity<PoiItemNormalized>["getSubscribers"]>[0]): Promise<import("./BaseEntity.js").PaginatorPage<import("./User.js").User>>;
31
32
  project(): Promise<never>;
32
33
  poi(): Promise<never>;
33
34
  event(): Promise<never>;
@@ -37,7 +38,7 @@ export declare class Poi extends BaseEntity<any> {
37
38
  *
38
39
  * Crée une instance de news et la récupère si nécessaire.
39
40
  */
40
- news(newsData?: Parameters<BaseEntity<any>["news"]>[0]): Promise<import("./News.js").News>;
41
+ news(): Promise<never>;
41
42
  /**
42
43
  * {@inheritDoc BaseEntity#follow}
43
44
  *
@@ -0,0 +1,57 @@
1
+ import type { GeoCoordinates, GeoPosition, IdObject, ParentsMap, PostalAddress, DateValue } from "./common.js";
2
+ import type EJSONType from "../../EJSONType.js";
3
+ type ObjectIDCtor = typeof EJSONType["ObjectID"];
4
+ type ObjectID = InstanceType<ObjectIDCtor>;
5
+ /**
6
+ * Types de poi supportés
7
+ */
8
+ export declare const POI_TYPES: readonly ["link", "tool", "machine", "software", "rh", "Resource material", "Financial Ressource", "ficheBlanche", "geoJson", "compostPickup", "video", "sharedLibrary", "recoveryCenter", "trash", "history", "something2See", "funPlace", "place", "artPiece", "streetArts", "openScene", "stand", "parking", "other"];
9
+ export type PoiType = (typeof POI_TYPES)[number];
10
+ export interface PoiItemJson {
11
+ _id: IdObject;
12
+ collection: "poi";
13
+ name: string;
14
+ type: PoiType;
15
+ created?: DateValue;
16
+ updated?: DateValue;
17
+ modified?: DateValue;
18
+ parent?: ParentsMap;
19
+ description?: string;
20
+ slug?: string;
21
+ address?: PostalAddress;
22
+ geo?: GeoCoordinates;
23
+ geoPosition?: GeoPosition;
24
+ tags?: string[];
25
+ ursl?: string[];
26
+ creator?: string;
27
+ profilImageUrl?: string;
28
+ profilMediumImageUrl?: string;
29
+ profilThumbImageUrl?: string;
30
+ profilMarkerImageUrl?: string;
31
+ [key: string]: unknown;
32
+ }
33
+ export interface PoiItemNormalized {
34
+ id: string;
35
+ _id: ObjectID;
36
+ collection: "poi";
37
+ name: string;
38
+ type: PoiType;
39
+ created?: Date;
40
+ updated?: Date;
41
+ modified?: Date;
42
+ parent?: ParentsMap;
43
+ description?: string;
44
+ slug?: string;
45
+ address?: PostalAddress;
46
+ geo?: GeoCoordinates;
47
+ geoPosition?: GeoPosition;
48
+ tags?: string[];
49
+ ursl?: string[];
50
+ creator?: string;
51
+ profilImageUrl?: string;
52
+ profilMediumImageUrl?: string;
53
+ profilThumbImageUrl?: string;
54
+ profilMarkerImageUrl?: string;
55
+ [key: string]: unknown;
56
+ }
57
+ export {};
@@ -2342,10 +2342,17 @@ declare const endpoints: {
2342
2342
  $ref: string;
2343
2343
  };
2344
2344
  urls: {
2345
- items: {
2345
+ anyOf: ({
2346
+ items: {
2347
+ type: string;
2348
+ };
2346
2349
  type: string;
2347
- };
2348
- type: string;
2350
+ enum?: undefined;
2351
+ } | {
2352
+ enum: string[];
2353
+ type: string;
2354
+ items?: undefined;
2355
+ })[];
2349
2356
  };
2350
2357
  birthDate?: undefined;
2351
2358
  fixe?: undefined;
@@ -16268,23 +16275,31 @@ declare const endpoints: {
16268
16275
  type: string;
16269
16276
  };
16270
16277
  parent: {
16271
- additionalProperties: boolean;
16272
- patternProperties: {
16273
- "^(?:[a-f0-9]{24}|@userId)$": {
16274
- additionalProperties: boolean;
16275
- properties: {
16276
- name: {
16277
- type: string;
16278
- };
16279
- type: {
16280
- type: string;
16278
+ oneOf: ({
16279
+ const: string;
16280
+ type: string;
16281
+ } | {
16282
+ additionalProperties: boolean;
16283
+ patternProperties: {
16284
+ "^(?:[a-f0-9]{24}|@userId)$": {
16285
+ additionalProperties: boolean;
16286
+ properties: {
16287
+ name: {
16288
+ type: string;
16289
+ };
16290
+ type: {
16291
+ type: string;
16292
+ };
16281
16293
  };
16294
+ required: string[];
16295
+ type: string;
16282
16296
  };
16283
- required: string[];
16284
- type: string;
16285
16297
  };
16286
- };
16287
- type: string;
16298
+ type: string;
16299
+ })[];
16300
+ additionalProperties?: undefined;
16301
+ patternProperties?: undefined;
16302
+ type?: undefined;
16288
16303
  };
16289
16304
  preferences: {
16290
16305
  default: {
@@ -18129,6 +18144,7 @@ declare const endpoints: {
18129
18144
  };
18130
18145
  };
18131
18146
  type: string;
18147
+ oneOf?: undefined;
18132
18148
  };
18133
18149
  preferences: {
18134
18150
  default: {
package/types/index.d.ts CHANGED
@@ -57,8 +57,10 @@ export type * from "./api/serverDataType/Organization.js";
57
57
  export { ORGANIZATION_TYPES } from "./api/serverDataType/Organization.js";
58
58
  export { PROJECT_AVANCEMENTS } from "./api/serverDataType/Project.js";
59
59
  export { EVENT_TYPES } from "./api/serverDataType/Event.js";
60
+ export { POI_TYPES } from "./api/serverDataType/Poi.js";
60
61
  export type * from "./api/serverDataType/Project.js";
61
62
  export type * from "./api/serverDataType/Event.js";
63
+ export type * from "./api/serverDataType/Poi.js";
62
64
  export type * from "./api/serverDataType/News.js";
63
65
  export type * from "./api/serverDataType/Comment.js";
64
66
  export type * from "./api/serverDataType/Answer.js";