@communecter/cocolight-api-client 1.0.33 → 1.0.35

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/src/api/Event.js CHANGED
@@ -169,5 +169,127 @@ export class Event extends BaseEntity {
169
169
  return super.unfollow();
170
170
  }
171
171
 
172
+ /**
173
+ * ───────────────────────────────
174
+ * costum
175
+ * ───────────────────────────────
176
+ */
177
+
178
+ async costumRequestActors(data = {}){
179
+
180
+ data = {
181
+ ...data,
182
+ pathParams: {
183
+ id: this.id,
184
+ type: "events"
185
+ }
186
+ };
187
+
188
+ const actors = await this.endpointApi.costumEventRequestActors(data);
189
+
190
+ // const transformedActors = actors
191
+ // .filter(actor => {
192
+ // const isValid = !!actor?.type;
193
+ // if (!isValid) {
194
+ // this.apiClient._logger?.warn?.(`Objet ignoré car sans 'type' : ${actor?.id}`);
195
+ // }
196
+ // return isValid;
197
+ // })
198
+ // .map(({ id, name, type, ...meta }) => ({
199
+ // id,
200
+ // name,
201
+ // collection: type,
202
+ // meta
203
+ // }));
204
+
205
+ // const rawList = this._linkEntities(transformedActors);
206
+
207
+ return actors;
208
+ }
209
+
210
+ async costumRequestSubevents(data = {}){
211
+
212
+ data = {
213
+ ...data,
214
+ pathParams: {
215
+ id: this.id,
216
+ type: "events"
217
+ }
218
+ };
219
+
220
+ return this.endpointApi.costumEventRequestSubevents(data);
221
+ }
222
+
223
+ async costumRequestDates(data = {}){
224
+ data = {
225
+ ...data,
226
+ pathParams: {
227
+ id: this.id,
228
+ type: "events"
229
+ }
230
+ };
231
+
232
+ return this.endpointApi.costumEventRequestDates(data);
233
+ }
234
+
235
+ async costumRequestElementEvents(data = {}){
236
+ data = {
237
+ ...data,
238
+ pathParams: {
239
+ id: this.id,
240
+ type: "events"
241
+ }
242
+ };
243
+
244
+ return this.endpointApi.costumEventRequestElementEvent(data);
245
+ }
246
+
247
+ async costumRequestCategories(data = {}){
248
+ data = {
249
+ ...data,
250
+ pathParams: {
251
+ id: this.id,
252
+ type: "events"
253
+ }
254
+ };
255
+
256
+ return this.endpointApi.costumEventRequestCategories(data);
257
+ }
258
+
259
+ async costumRequestEvent(data = {}){
260
+ data = {
261
+ ...data,
262
+ pathParams: {
263
+ id: this.id,
264
+ type: "events"
265
+ }
266
+ };
267
+
268
+ return this.endpointApi.costumEventRequestEvent(data);
269
+ }
270
+
271
+ async costumRequestLinkTlToEvent(data = {}){
272
+ data = {
273
+ ...data,
274
+ pathParams: {
275
+ id: this.id,
276
+ type: "events"
277
+ }
278
+ };
279
+
280
+ return this.endpointApi.costumEventRequestLinkTlToEvent(data);
281
+ }
282
+
283
+ async costumRequestLoadContextTags(data = {}){
284
+ data = {
285
+ ...data,
286
+ pathParams: {
287
+ id: this.id,
288
+ type: "events"
289
+ }
290
+ };
291
+
292
+ return this.endpointApi.costumEventRequestLoadContextTag(data);
293
+ }
172
294
 
173
295
  }