@communecter/cocolight-api-client 1.0.97 → 1.0.99

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.97",
3
+ "version": "1.0.99",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
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(eventData: EntityData): Promise<Poi> {
196
+ async poi(poiData: EntityData): Promise<Poi> {
197
197
  try {
198
- const poi = new Poi(this._client, eventData, { EndpointApi, User, Organization, Project, Poi, Badge, News, Comment });
199
- if (!eventData.id && !eventData.slug) {
200
- throw new Error("Vous devez fournir un id ou un slug pour créer une instance Event.");
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;
@@ -9,7 +9,8 @@ import type {
9
9
  OpeningHoursEntry,
10
10
  ParentsMap,
11
11
  PostalAddress,
12
- DateValue
12
+ DateValue,
13
+ SocialNetwork
13
14
  } from "./common.js";
14
15
  import type EJSONType from "../../EJSONType.js";
15
16
 
@@ -61,6 +62,7 @@ export interface OrganizationItemJson {
61
62
  profilThumbImageUrl?: string;
62
63
  profilMarkerImageUrl?: string;
63
64
  email?: string;
65
+ socialNetwork?: SocialNetwork;
64
66
  [key: string]: unknown;
65
67
  }
66
68
 
@@ -89,5 +91,6 @@ export interface OrganizationItemNormalized {
89
91
  profilThumbImageUrl?: string;
90
92
  profilMarkerImageUrl?: string;
91
93
  email?: string;
94
+ socialNetwork?: SocialNetwork;
92
95
  [key: string]: unknown;
93
96
  }
@@ -40,7 +40,7 @@ export interface PoiItemJson {
40
40
  geo?: GeoCoordinates;
41
41
  geoPosition?: GeoPosition;
42
42
  tags?: string[];
43
- ursl?: string[];
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
- ursl?: string[];
68
+ urls?: string[];
69
69
  creator?: string;
70
70
  profilImageUrl?: string;
71
71
  profilMediumImageUrl?: string;
@@ -7,7 +7,8 @@ import type {
7
7
  LinkEventsRef,
8
8
  ParentsMap,
9
9
  PostalAddress,
10
- DateValue
10
+ DateValue,
11
+ SocialNetwork
11
12
  } from "./common.js";
12
13
  import type EJSONType from "../../EJSONType.js";
13
14
 
@@ -61,6 +62,7 @@ export interface ProjectItemJson {
61
62
  profilMediumImageUrl?: string;
62
63
  profilThumbImageUrl?: string;
63
64
  profilMarkerImageUrl?: string;
65
+ socialNetwork?: SocialNetwork;
64
66
  [key: string]: unknown;
65
67
  }
66
68
 
@@ -87,5 +89,6 @@ export interface ProjectItemNormalized {
87
89
  profilMediumImageUrl?: string;
88
90
  profilThumbImageUrl?: string;
89
91
  profilMarkerImageUrl?: string;
92
+ socialNetwork?: SocialNetwork;
90
93
  [key: string]: unknown;
91
94
  }
@@ -9,7 +9,8 @@ import type {
9
9
  LinkFollowsUserRef,
10
10
  LinkFollowersUserRef,
11
11
  PostalAddress,
12
- DateValue
12
+ DateValue,
13
+ SocialNetwork
13
14
  } from "./common.js";
14
15
  import type EJSONType from "../../EJSONType.js";
15
16
 
@@ -68,6 +69,7 @@ export interface UserItemJson {
68
69
  profilBannerUrl?: string;
69
70
  profilRealBannerUrl?: string;
70
71
  preferences?: UserPreferences;
72
+ socialNetwork?: SocialNetwork;
71
73
  [key: string]: unknown;
72
74
  }
73
75
 
@@ -99,5 +101,6 @@ export interface UserItemNormalized {
99
101
  profilBannerUrl?: string;
100
102
  profilRealBannerUrl?: string;
101
103
  preferences?: UserPreferences;
104
+ socialNetwork?: SocialNetwork;
102
105
  [key: string]: unknown;
103
106
  }
@@ -78,4 +78,7 @@ export interface OpeningHourSpan {
78
78
  export interface OpeningHoursEntry {
79
79
  dayOfWeek: DayOfWeek;
80
80
  hours: OpeningHourSpan[];
81
- }
81
+ }
82
+
83
+ // Réexport de SocialNetworkPayload comme SocialNetwork pour les types serverDataType
84
+ export type { SocialNetworkPayload as SocialNetwork } from "../../types/payloads.js";
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(eventData: EntityData): Promise<Poi>;
54
+ poi(poiData: EntityData): Promise<Poi>;
55
55
  /**
56
56
  * Creates a new Answer instance and optionally retrieves answer data.
57
57
  */
@@ -1,4 +1,4 @@
1
- import type { GeoCoordinates, GeoPosition, IdObject, LinkMemberOfRef, LinkMemberRef, LinkProjectRef, LinkEventsRef, OpeningHoursEntry, ParentsMap, PostalAddress, DateValue } from "./common.js";
1
+ import type { GeoCoordinates, GeoPosition, IdObject, LinkMemberOfRef, LinkMemberRef, LinkProjectRef, LinkEventsRef, OpeningHoursEntry, ParentsMap, PostalAddress, DateValue, SocialNetwork } from "./common.js";
2
2
  import type EJSONType from "../../EJSONType.js";
3
3
  type ObjectIDCtor = typeof EJSONType["ObjectID"];
4
4
  type ObjectID = InstanceType<ObjectIDCtor>;
@@ -38,6 +38,7 @@ export interface OrganizationItemJson {
38
38
  profilThumbImageUrl?: string;
39
39
  profilMarkerImageUrl?: string;
40
40
  email?: string;
41
+ socialNetwork?: SocialNetwork;
41
42
  [key: string]: unknown;
42
43
  }
43
44
  export interface OrganizationItemNormalized {
@@ -65,6 +66,7 @@ export interface OrganizationItemNormalized {
65
66
  profilThumbImageUrl?: string;
66
67
  profilMarkerImageUrl?: string;
67
68
  email?: string;
69
+ socialNetwork?: SocialNetwork;
68
70
  [key: string]: unknown;
69
71
  }
70
72
  export {};
@@ -22,7 +22,7 @@ export interface PoiItemJson {
22
22
  geo?: GeoCoordinates;
23
23
  geoPosition?: GeoPosition;
24
24
  tags?: string[];
25
- ursl?: string[];
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
- ursl?: string[];
49
+ urls?: string[];
50
50
  creator?: string;
51
51
  profilImageUrl?: string;
52
52
  profilMediumImageUrl?: string;
@@ -1,4 +1,4 @@
1
- import type { GeoCoordinates, GeoPosition, IdObject, LinkContributorsRef, LinkProjectRef, LinkEventsRef, ParentsMap, PostalAddress, DateValue } from "./common.js";
1
+ import type { GeoCoordinates, GeoPosition, IdObject, LinkContributorsRef, LinkProjectRef, LinkEventsRef, ParentsMap, PostalAddress, DateValue, SocialNetwork } from "./common.js";
2
2
  import type EJSONType from "../../EJSONType.js";
3
3
  type ObjectIDCtor = typeof EJSONType["ObjectID"];
4
4
  type ObjectID = InstanceType<ObjectIDCtor>;
@@ -35,6 +35,7 @@ export interface ProjectItemJson {
35
35
  profilMediumImageUrl?: string;
36
36
  profilThumbImageUrl?: string;
37
37
  profilMarkerImageUrl?: string;
38
+ socialNetwork?: SocialNetwork;
38
39
  [key: string]: unknown;
39
40
  }
40
41
  export interface ProjectItemNormalized {
@@ -60,6 +61,7 @@ export interface ProjectItemNormalized {
60
61
  profilMediumImageUrl?: string;
61
62
  profilThumbImageUrl?: string;
62
63
  profilMarkerImageUrl?: string;
64
+ socialNetwork?: SocialNetwork;
63
65
  [key: string]: unknown;
64
66
  }
65
67
  export {};
@@ -1,4 +1,4 @@
1
- import type { GeoCoordinates, GeoPosition, IdObject, LinkMemberOfUserRef, LinkProjectRef, LinkEventsRef, LinkfriendsRef, LinkFollowsUserRef, LinkFollowersUserRef, PostalAddress, DateValue } from "./common.js";
1
+ import type { GeoCoordinates, GeoPosition, IdObject, LinkMemberOfUserRef, LinkProjectRef, LinkEventsRef, LinkfriendsRef, LinkFollowsUserRef, LinkFollowersUserRef, PostalAddress, DateValue, SocialNetwork } from "./common.js";
2
2
  import type EJSONType from "../../EJSONType.js";
3
3
  type ObjectIDCtor = typeof EJSONType["ObjectID"];
4
4
  type ObjectID = InstanceType<ObjectIDCtor>;
@@ -51,6 +51,7 @@ export interface UserItemJson {
51
51
  profilBannerUrl?: string;
52
52
  profilRealBannerUrl?: string;
53
53
  preferences?: UserPreferences;
54
+ socialNetwork?: SocialNetwork;
54
55
  [key: string]: unknown;
55
56
  }
56
57
  export interface UserItemNormalized {
@@ -81,6 +82,7 @@ export interface UserItemNormalized {
81
82
  profilBannerUrl?: string;
82
83
  profilRealBannerUrl?: string;
83
84
  preferences?: UserPreferences;
85
+ socialNetwork?: SocialNetwork;
84
86
  [key: string]: unknown;
85
87
  }
86
88
  export {};
@@ -70,3 +70,4 @@ export interface OpeningHoursEntry {
70
70
  dayOfWeek: DayOfWeek;
71
71
  hours: OpeningHourSpan[];
72
72
  }
73
+ export type { SocialNetworkPayload as SocialNetwork } from "../../types/payloads.js";