@communecter/cocolight-api-client 1.0.35 → 1.0.37
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/BaseEntity.js +139 -0
- package/src/api/EndpointApi.types.d.ts +1 -1
- package/src/api/Event.js +0 -123
- package/src/endpoints.module.js +1 -1
package/package.json
CHANGED
package/src/api/BaseEntity.js
CHANGED
|
@@ -2485,6 +2485,145 @@ export class BaseEntity {
|
|
|
2485
2485
|
};
|
|
2486
2486
|
}
|
|
2487
2487
|
|
|
2488
|
+
/**
|
|
2489
|
+
* ───────────────────────────────
|
|
2490
|
+
* custom
|
|
2491
|
+
* ───────────────────────────────
|
|
2492
|
+
*/
|
|
2493
|
+
|
|
2494
|
+
async costumEventRequestActors(data = {}){
|
|
2495
|
+
|
|
2496
|
+
data = {
|
|
2497
|
+
pathParams: {
|
|
2498
|
+
id: this.id,
|
|
2499
|
+
type: this.getEntityType()
|
|
2500
|
+
},
|
|
2501
|
+
...data
|
|
2502
|
+
};
|
|
2503
|
+
|
|
2504
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestActors(finalData));
|
|
2505
|
+
|
|
2506
|
+
const actors = await wrappedFinalizer(data);
|
|
2507
|
+
|
|
2508
|
+
// const transformedActors = actors
|
|
2509
|
+
// .filter(actor => {
|
|
2510
|
+
// const isValid = !!actor?.type;
|
|
2511
|
+
// if (!isValid) {
|
|
2512
|
+
// this.apiClient._logger?.warn?.(`Objet ignoré car sans 'type' : ${actor?.id}`);
|
|
2513
|
+
// }
|
|
2514
|
+
// return isValid;
|
|
2515
|
+
// })
|
|
2516
|
+
// .map(({ id, name, type, ...meta }) => ({
|
|
2517
|
+
// id,
|
|
2518
|
+
// name,
|
|
2519
|
+
// collection: type,
|
|
2520
|
+
// meta
|
|
2521
|
+
// }));
|
|
2522
|
+
|
|
2523
|
+
// const rawList = this._linkEntities(transformedActors);
|
|
2524
|
+
|
|
2525
|
+
return actors;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
async costumEventRequestSubevents(data = {}){
|
|
2529
|
+
|
|
2530
|
+
data = {
|
|
2531
|
+
pathParams: {
|
|
2532
|
+
id: this.id,
|
|
2533
|
+
type: this.getEntityType()
|
|
2534
|
+
},
|
|
2535
|
+
...data
|
|
2536
|
+
};
|
|
2537
|
+
|
|
2538
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestSubevents(finalData));
|
|
2539
|
+
|
|
2540
|
+
return wrappedFinalizer(data);
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
async costumEventRequestDates(data = {}){
|
|
2544
|
+
data = {
|
|
2545
|
+
pathParams: {
|
|
2546
|
+
id: this.id,
|
|
2547
|
+
type: this.getEntityType()
|
|
2548
|
+
},
|
|
2549
|
+
...data
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2552
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestDates(finalData));
|
|
2553
|
+
|
|
2554
|
+
return wrappedFinalizer(data);
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
async costumEventRequestElementEvent(data = {}){
|
|
2558
|
+
data = {
|
|
2559
|
+
pathParams: {
|
|
2560
|
+
id: this.id,
|
|
2561
|
+
type: this.getEntityType()
|
|
2562
|
+
},
|
|
2563
|
+
...data
|
|
2564
|
+
};
|
|
2565
|
+
|
|
2566
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestElementEvent(finalData));
|
|
2567
|
+
|
|
2568
|
+
return wrappedFinalizer(data);
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
async costumEventRequestCategories(data = {}){
|
|
2572
|
+
data = {
|
|
2573
|
+
pathParams: {
|
|
2574
|
+
id: this.id,
|
|
2575
|
+
type: this.getEntityType()
|
|
2576
|
+
},
|
|
2577
|
+
...data
|
|
2578
|
+
};
|
|
2579
|
+
|
|
2580
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestCategories(finalData));
|
|
2581
|
+
|
|
2582
|
+
return wrappedFinalizer(data);
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
async costumEventRequestEvent(data = {}){
|
|
2586
|
+
data = {
|
|
2587
|
+
pathParams: {
|
|
2588
|
+
id: this.id,
|
|
2589
|
+
type: this.getEntityType()
|
|
2590
|
+
},
|
|
2591
|
+
...data
|
|
2592
|
+
};
|
|
2593
|
+
|
|
2594
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestEvent(finalData));
|
|
2595
|
+
|
|
2596
|
+
return wrappedFinalizer(data);
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
async costumEventRequestLinkTlToEvent(data = {}){
|
|
2600
|
+
data = {
|
|
2601
|
+
pathParams: {
|
|
2602
|
+
id: this.id,
|
|
2603
|
+
type: this.getEntityType()
|
|
2604
|
+
},
|
|
2605
|
+
...data
|
|
2606
|
+
};
|
|
2607
|
+
|
|
2608
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestLinkTlToEvent(finalData));
|
|
2609
|
+
|
|
2610
|
+
return wrappedFinalizer(data);
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
async costumEventRequestLoadContextTag(data = {}){
|
|
2614
|
+
data = {
|
|
2615
|
+
pathParams: {
|
|
2616
|
+
id: this.id,
|
|
2617
|
+
type: this.getEntityType()
|
|
2618
|
+
},
|
|
2619
|
+
...data
|
|
2620
|
+
};
|
|
2621
|
+
|
|
2622
|
+
const wrappedFinalizer = this._withCostumContext((finalData) => this.endpointApi.costumEventRequestLoadContextTag(finalData));
|
|
2623
|
+
|
|
2624
|
+
return wrappedFinalizer(data);
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2488
2627
|
|
|
2489
2628
|
}
|
|
2490
2629
|
|
package/src/api/Event.js
CHANGED
|
@@ -169,127 +169,4 @@ 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
|
-
}
|
|
294
|
-
|
|
295
172
|
}
|