@communecter/cocolight-api-client 1.0.97 → 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 +4 -4
- package/src/api/serverDataType/Poi.ts +2 -2
- package/types/Api.d.ts +1 -1
- package/types/api/serverDataType/Poi.d.ts +2 -2
package/package.json
CHANGED
package/src/Api.ts
CHANGED
|
@@ -193,11 +193,11 @@ export default class Api {
|
|
|
193
193
|
/**
|
|
194
194
|
* Creates a new Poi instance and optionally retrieves its profile.
|
|
195
195
|
*/
|
|
196
|
-
async poi(
|
|
196
|
+
async poi(poiData: EntityData): Promise<Poi> {
|
|
197
197
|
try {
|
|
198
|
-
const poi = new Poi(this._client,
|
|
199
|
-
if (!
|
|
200
|
-
throw new Error("Vous devez fournir un id ou un slug pour créer une instance
|
|
198
|
+
const poi = new Poi(this._client, poiData, { EndpointApi, User, Organization, Project, Poi, Badge, News, Comment });
|
|
199
|
+
if (!poiData.id && !poiData.slug) {
|
|
200
|
+
throw new Error("Vous devez fournir un id ou un slug pour créer une instance Poi.");
|
|
201
201
|
}
|
|
202
202
|
await poi.get();
|
|
203
203
|
return poi;
|
|
@@ -40,7 +40,7 @@ export interface PoiItemJson {
|
|
|
40
40
|
geo?: GeoCoordinates;
|
|
41
41
|
geoPosition?: GeoPosition;
|
|
42
42
|
tags?: string[];
|
|
43
|
-
|
|
43
|
+
urls?: string[];
|
|
44
44
|
creator?: string;
|
|
45
45
|
profilImageUrl?: string;
|
|
46
46
|
profilMediumImageUrl?: string;
|
|
@@ -65,7 +65,7 @@ export interface PoiItemNormalized {
|
|
|
65
65
|
geo?: GeoCoordinates;
|
|
66
66
|
geoPosition?: GeoPosition;
|
|
67
67
|
tags?: string[];
|
|
68
|
-
|
|
68
|
+
urls?: string[];
|
|
69
69
|
creator?: string;
|
|
70
70
|
profilImageUrl?: string;
|
|
71
71
|
profilMediumImageUrl?: string;
|
package/types/Api.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export default class Api {
|
|
|
51
51
|
/**
|
|
52
52
|
* Creates a new Poi instance and optionally retrieves its profile.
|
|
53
53
|
*/
|
|
54
|
-
poi(
|
|
54
|
+
poi(poiData: EntityData): Promise<Poi>;
|
|
55
55
|
/**
|
|
56
56
|
* Creates a new Answer instance and optionally retrieves answer data.
|
|
57
57
|
*/
|
|
@@ -22,7 +22,7 @@ export interface PoiItemJson {
|
|
|
22
22
|
geo?: GeoCoordinates;
|
|
23
23
|
geoPosition?: GeoPosition;
|
|
24
24
|
tags?: string[];
|
|
25
|
-
|
|
25
|
+
urls?: string[];
|
|
26
26
|
creator?: string;
|
|
27
27
|
profilImageUrl?: string;
|
|
28
28
|
profilMediumImageUrl?: string;
|
|
@@ -46,7 +46,7 @@ export interface PoiItemNormalized {
|
|
|
46
46
|
geo?: GeoCoordinates;
|
|
47
47
|
geoPosition?: GeoPosition;
|
|
48
48
|
tags?: string[];
|
|
49
|
-
|
|
49
|
+
urls?: string[];
|
|
50
50
|
creator?: string;
|
|
51
51
|
profilImageUrl?: string;
|
|
52
52
|
profilMediumImageUrl?: string;
|