@communecter/cocolight-api-client 1.0.96 → 1.0.98
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/dist/cocolight-api-client.browser.js +1 -1
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/src/Api.ts +17 -0
- package/src/api/EntityRegistry.ts +2 -2
- package/src/api/Poi.ts +14 -6
- package/src/api/serverDataType/Poi.ts +75 -0
- package/src/endpoints.module.ts +1 -1
- package/src/index.ts +2 -0
- package/types/Api.d.ts +5 -0
- package/types/api/Poi.d.ts +5 -4
- package/types/api/serverDataType/Poi.d.ts +57 -0
- package/types/endpoints.module.d.ts +10 -3
- package/types/index.d.ts +2 -0
package/types/api/Poi.d.ts
CHANGED
|
@@ -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<
|
|
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(
|
|
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<
|
|
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(
|
|
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
|
+
urls?: 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
|
+
urls?: 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
|
-
|
|
2345
|
+
anyOf: ({
|
|
2346
|
+
items: {
|
|
2347
|
+
type: string;
|
|
2348
|
+
};
|
|
2346
2349
|
type: string;
|
|
2347
|
-
|
|
2348
|
-
|
|
2350
|
+
enum?: undefined;
|
|
2351
|
+
} | {
|
|
2352
|
+
enum: string[];
|
|
2353
|
+
type: string;
|
|
2354
|
+
items?: undefined;
|
|
2355
|
+
})[];
|
|
2349
2356
|
};
|
|
2350
2357
|
birthDate?: undefined;
|
|
2351
2358
|
fixe?: undefined;
|
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";
|