@communecter/cocolight-api-client 1.0.36 → 1.0.38
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 +25 -26
- package/src/api/EndpointApi.types.d.ts +1 -1
- package/src/api/Event.js +13 -0
- package/src/endpoints.module.js +1 -1
package/package.json
CHANGED
package/src/api/BaseEntity.js
CHANGED
|
@@ -2340,23 +2340,6 @@ export class BaseEntity {
|
|
|
2340
2340
|
return endpoint.request.properties[path].default;
|
|
2341
2341
|
}
|
|
2342
2342
|
|
|
2343
|
-
|
|
2344
|
-
/**
|
|
2345
|
-
* Recherche liée à l'entité, version stateless.
|
|
2346
|
-
*
|
|
2347
|
-
* @param {Object} data - Données initiales de recherche.
|
|
2348
|
-
* @returns {Object} - Un paginateur avec .next(), .prev(), etc.
|
|
2349
|
-
*/
|
|
2350
|
-
async searchCostum(data = {}) {
|
|
2351
|
-
|
|
2352
|
-
const paginator = this._createPaginatorEngine({
|
|
2353
|
-
initialData: data,
|
|
2354
|
-
finalizer: this._withCostumContext((finalData) => this.endpointApi.globalAutocompleteCostum(finalData)),
|
|
2355
|
-
});
|
|
2356
|
-
|
|
2357
|
-
return paginator.next();
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
2343
|
/**
|
|
2361
2344
|
* Coeur de pagination stateless et réutilisable, sans logique métier.
|
|
2362
2345
|
*
|
|
@@ -2487,11 +2470,27 @@ export class BaseEntity {
|
|
|
2487
2470
|
|
|
2488
2471
|
/**
|
|
2489
2472
|
* ───────────────────────────────
|
|
2490
|
-
*
|
|
2473
|
+
* custom
|
|
2491
2474
|
* ───────────────────────────────
|
|
2492
2475
|
*/
|
|
2493
2476
|
|
|
2494
|
-
|
|
2477
|
+
/**
|
|
2478
|
+
* Recherche liée à l'entité, version stateless.
|
|
2479
|
+
*
|
|
2480
|
+
* @param {Object} data - Données initiales de recherche.
|
|
2481
|
+
* @returns {Object} - Un paginateur avec .next(), .prev(), etc.
|
|
2482
|
+
*/
|
|
2483
|
+
async searchCostum(data = {}) {
|
|
2484
|
+
|
|
2485
|
+
const paginator = this._createPaginatorEngine({
|
|
2486
|
+
initialData: data,
|
|
2487
|
+
finalizer: this._withCostumContext((finalData) => this.endpointApi.globalAutocompleteCostum(finalData)),
|
|
2488
|
+
});
|
|
2489
|
+
|
|
2490
|
+
return paginator.next();
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
async costumEventRequestActors(data = {}){
|
|
2495
2494
|
|
|
2496
2495
|
data = {
|
|
2497
2496
|
pathParams: {
|
|
@@ -2525,7 +2524,7 @@ export class BaseEntity {
|
|
|
2525
2524
|
return actors;
|
|
2526
2525
|
}
|
|
2527
2526
|
|
|
2528
|
-
async
|
|
2527
|
+
async costumEventRequestSubevents(data = {}){
|
|
2529
2528
|
|
|
2530
2529
|
data = {
|
|
2531
2530
|
pathParams: {
|
|
@@ -2540,7 +2539,7 @@ export class BaseEntity {
|
|
|
2540
2539
|
return wrappedFinalizer(data);
|
|
2541
2540
|
}
|
|
2542
2541
|
|
|
2543
|
-
async
|
|
2542
|
+
async costumEventRequestDates(data = {}){
|
|
2544
2543
|
data = {
|
|
2545
2544
|
pathParams: {
|
|
2546
2545
|
id: this.id,
|
|
@@ -2554,7 +2553,7 @@ export class BaseEntity {
|
|
|
2554
2553
|
return wrappedFinalizer(data);
|
|
2555
2554
|
}
|
|
2556
2555
|
|
|
2557
|
-
async
|
|
2556
|
+
async costumEventRequestElementEvent(data = {}){
|
|
2558
2557
|
data = {
|
|
2559
2558
|
pathParams: {
|
|
2560
2559
|
id: this.id,
|
|
@@ -2568,7 +2567,7 @@ export class BaseEntity {
|
|
|
2568
2567
|
return wrappedFinalizer(data);
|
|
2569
2568
|
}
|
|
2570
2569
|
|
|
2571
|
-
async
|
|
2570
|
+
async costumEventRequestCategories(data = {}){
|
|
2572
2571
|
data = {
|
|
2573
2572
|
pathParams: {
|
|
2574
2573
|
id: this.id,
|
|
@@ -2582,7 +2581,7 @@ export class BaseEntity {
|
|
|
2582
2581
|
return wrappedFinalizer(data);
|
|
2583
2582
|
}
|
|
2584
2583
|
|
|
2585
|
-
async
|
|
2584
|
+
async costumEventRequestEvent(data = {}){
|
|
2586
2585
|
data = {
|
|
2587
2586
|
pathParams: {
|
|
2588
2587
|
id: this.id,
|
|
@@ -2596,7 +2595,7 @@ export class BaseEntity {
|
|
|
2596
2595
|
return wrappedFinalizer(data);
|
|
2597
2596
|
}
|
|
2598
2597
|
|
|
2599
|
-
async
|
|
2598
|
+
async costumEventRequestLinkTlToEvent(data = {}){
|
|
2600
2599
|
data = {
|
|
2601
2600
|
pathParams: {
|
|
2602
2601
|
id: this.id,
|
|
@@ -2610,7 +2609,7 @@ export class BaseEntity {
|
|
|
2610
2609
|
return wrappedFinalizer(data);
|
|
2611
2610
|
}
|
|
2612
2611
|
|
|
2613
|
-
async
|
|
2612
|
+
async costumEventRequestLoadContextTag(data = {}){
|
|
2614
2613
|
data = {
|
|
2615
2614
|
pathParams: {
|
|
2616
2615
|
id: this.id,
|
package/src/api/Event.js
CHANGED
|
@@ -93,6 +93,19 @@ export class Event extends BaseEntity {
|
|
|
93
93
|
return hasChanged;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
async addEvent(data = {}) {
|
|
97
|
+
|
|
98
|
+
if (!this.isMe && !data.organizer) {
|
|
99
|
+
data.organizer = {};
|
|
100
|
+
data.organizer[`${this.parent.id}`] = {
|
|
101
|
+
type: this.parent.getEntityType(),
|
|
102
|
+
name: this.parent.name
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return this.callIsConnected(() => this.endpointApi.addEvent(data));
|
|
107
|
+
}
|
|
108
|
+
|
|
96
109
|
async getOrganizations() {
|
|
97
110
|
throw new ApiError(`getOrganizations n'existe pas dans ${this.constructor.name}`);
|
|
98
111
|
}
|