@communecter/cocolight-api-client 1.0.131 → 1.0.132
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 +3 -3
- 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/ApiClient.ts +3 -1
- package/src/api/Action.ts +4 -0
- package/src/api/Answer.ts +4 -1
- package/src/api/Badge.ts +5 -0
- package/src/api/BaseEntity.ts +96 -7
- package/src/api/Classified.ts +4 -0
- package/src/api/Comment.ts +3 -0
- package/src/api/EndpointApi.ts +16 -1
- package/src/api/EndpointApi.types.ts +375 -44
- package/src/api/Event.ts +5 -0
- package/src/api/Form.ts +64 -2
- package/src/api/News.ts +3 -0
- package/src/api/Organization.ts +44 -2
- package/src/api/Poi.ts +4 -0
- package/src/api/Project.ts +47 -0
- package/src/api/User.ts +10 -0
- package/src/api/serverDataType/Answer.ts +25 -0
- package/src/api/serverDataType/Form.ts +84 -4
- package/src/api/serverDataType/Organization.ts +13 -0
- package/src/api/serverDataType/Project.ts +15 -0
- package/src/endpoints.module.ts +1185 -208
- package/types/api/Action.d.ts +1 -0
- package/types/api/Answer.d.ts +1 -0
- package/types/api/Badge.d.ts +1 -0
- package/types/api/BaseEntity.d.ts +45 -0
- package/types/api/Classified.d.ts +1 -0
- package/types/api/Comment.d.ts +1 -0
- package/types/api/EndpointApi.d.ts +10 -1
- package/types/api/EndpointApi.types.d.ts +334 -41
- package/types/api/Event.d.ts +1 -0
- package/types/api/Form.d.ts +34 -0
- package/types/api/News.d.ts +1 -0
- package/types/api/Organization.d.ts +20 -1
- package/types/api/Poi.d.ts +1 -0
- package/types/api/Project.d.ts +21 -0
- package/types/api/User.d.ts +7 -0
- package/types/api/serverDataType/Answer.d.ts +22 -0
- package/types/api/serverDataType/Form.d.ts +89 -4
- package/types/api/serverDataType/Organization.d.ts +13 -0
- package/types/api/serverDataType/Project.d.ts +15 -0
- package/types/endpoints.module.d.ts +1222 -1005
package/package.json
CHANGED
package/src/Api.ts
CHANGED
|
@@ -132,9 +132,9 @@ export default class Api {
|
|
|
132
132
|
async user(userData: EntityData): Promise<User> {
|
|
133
133
|
try {
|
|
134
134
|
if (!userData.id && !userData.slug) {
|
|
135
|
-
return new User(this._client, userData, { EndpointApi, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Classified, Action });
|
|
135
|
+
return new User(this._client, userData, { EndpointApi, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
136
136
|
} else {
|
|
137
|
-
const user = new User(this._client, userData, { EndpointApi, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Classified, Action });
|
|
137
|
+
const user = new User(this._client, userData, { EndpointApi, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
138
138
|
await user.get();
|
|
139
139
|
return user;
|
|
140
140
|
}
|
|
@@ -150,7 +150,7 @@ export default class Api {
|
|
|
150
150
|
*/
|
|
151
151
|
async organization(organizationData: EntityData): Promise<Organization> {
|
|
152
152
|
try {
|
|
153
|
-
const organization = new Organization(this._client, organizationData, { EndpointApi, User, Project, Event, Poi, Badge, News, Comment, Answer, Classified, Action });
|
|
153
|
+
const organization = new Organization(this._client, organizationData, { EndpointApi, User, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
154
154
|
if (!organizationData.id && !organizationData.slug) {
|
|
155
155
|
throw new Error("Vous devez fournir un id ou un slug pour créer une instance Organization.");
|
|
156
156
|
}
|
|
@@ -167,7 +167,7 @@ export default class Api {
|
|
|
167
167
|
*/
|
|
168
168
|
async project(projectData: EntityData): Promise<Project> {
|
|
169
169
|
try {
|
|
170
|
-
const project = new Project(this._client, projectData, { EndpointApi, User, Organization, Event, Poi, Badge, News, Comment, Answer, Classified, Action });
|
|
170
|
+
const project = new Project(this._client, projectData, { EndpointApi, User, Organization, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
171
171
|
if (!projectData.id && !projectData.slug) {
|
|
172
172
|
throw new Error("Vous devez fournir un id ou un slug pour créer une instance Project.");
|
|
173
173
|
}
|
package/src/ApiClient.ts
CHANGED
package/src/api/Action.ts
CHANGED
|
@@ -600,4 +600,8 @@ export class Action extends BaseEntity<ActionItemNormalized> {
|
|
|
600
600
|
private _isIsoDateTime(value: string): boolean {
|
|
601
601
|
return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/.test(value);
|
|
602
602
|
}
|
|
603
|
+
|
|
604
|
+
override async form(): Promise<never> {
|
|
605
|
+
throw new ApiError(`form n'existe pas dans ${this.constructor.name}`, 501);
|
|
606
|
+
}
|
|
603
607
|
}
|
package/src/api/Answer.ts
CHANGED
|
@@ -65,5 +65,8 @@ export class Answer extends BaseEntity<AnswerItemNormalized> {
|
|
|
65
65
|
}
|
|
66
66
|
throw new ApiError(`Aucune réponse trouvée pour l'ID ${this.id}`, 404);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
override async form(): Promise<never> {
|
|
70
|
+
throw new ApiError(`form n'existe pas dans ${this.constructor.name}`, 501);
|
|
71
|
+
}
|
|
69
72
|
}
|
package/src/api/Badge.ts
CHANGED
|
@@ -135,4 +135,9 @@ export class Badge extends BaseEntity<any> {
|
|
|
135
135
|
throw new ApiError(`news n'existe pas dans ${this.constructor.name}`, 501);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
|
|
139
|
+
override async form(): Promise<never> {
|
|
140
|
+
throw new ApiError(`form n'existe pas dans ${this.constructor.name}`, 501);
|
|
141
|
+
}
|
|
142
|
+
|
|
138
143
|
}
|
package/src/api/BaseEntity.ts
CHANGED
|
@@ -78,6 +78,7 @@ type ClassifiedInput = { id: string } | Record<string, any>;
|
|
|
78
78
|
type BadgeInput = { id: string } | Record<string, any>;
|
|
79
79
|
type NewsInput = { id: string } | Record<string, any>;
|
|
80
80
|
type ActionInput = { id: string } | Record<string, any>;
|
|
81
|
+
type FormInput = { id: string } | Record<string, any>;
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* On force le type de l'import comme une fabrique qui renvoie un objet
|
|
@@ -106,6 +107,21 @@ type Action = import("./Action.js").Action;
|
|
|
106
107
|
type AnyEntity = User | Organization | Project | Poi | EventEntity | Badge | News | Comment | Answer | Form | Classified | Action;
|
|
107
108
|
type ParentLike = BaseEntity<any> & { apiClient: ApiClient, userContext?: User | null };
|
|
108
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Variantes d'endpoint disponibles pour `searchCostum`.
|
|
112
|
+
* Tous les variants doivent accepter le même schéma de requête/réponse que
|
|
113
|
+
* `GLOBAL_AUTOCOMPLETE_COSTUM` (drop-in remplacement).
|
|
114
|
+
*
|
|
115
|
+
* - `default` → `/co2/search/globalautocomplete`
|
|
116
|
+
* - `navigator-tl` → `/costum/navigator/gettl`
|
|
117
|
+
*/
|
|
118
|
+
export type SearchCostumVariant = "default" | "navigator-tl";
|
|
119
|
+
|
|
120
|
+
const SEARCH_COSTUM_ENDPOINTS = {
|
|
121
|
+
"default": "globalAutocompleteCostum",
|
|
122
|
+
"navigator-tl": "navigatorGettl",
|
|
123
|
+
} as const satisfies Record<SearchCostumVariant, keyof EndpointApi>;
|
|
124
|
+
|
|
109
125
|
// Types pour les dépendances
|
|
110
126
|
type EndpointApiCtor = { new(apiClient: ApiClient): EndpointApi };
|
|
111
127
|
type EndpointApiDep = EndpointApi | EndpointApiCtor;
|
|
@@ -179,6 +195,9 @@ export type CostumContextFields = {
|
|
|
179
195
|
costumSlug: string;
|
|
180
196
|
contextId: string;
|
|
181
197
|
contextType: EntityType;
|
|
198
|
+
// Aliases historiques lus en fallback côté backend (cf. SearchNew::getQueries).
|
|
199
|
+
costumId: string;
|
|
200
|
+
costumType: EntityType;
|
|
182
201
|
sourceKey: string[];
|
|
183
202
|
};
|
|
184
203
|
|
|
@@ -205,6 +224,12 @@ export type PaginatorState = {
|
|
|
205
224
|
index: number;
|
|
206
225
|
history: PaginationCursor[];
|
|
207
226
|
sizes: number[];
|
|
227
|
+
/**
|
|
228
|
+
* Métadonnées libres survivant à la sérialisation JSON. Permet aux méthodes paginées
|
|
229
|
+
* de stocker des paramètres spécifiques (ex. `variant` pour `searchCostum`) qui doivent
|
|
230
|
+
* être restaurés lors d'un `restorePaginationFromJSON`.
|
|
231
|
+
*/
|
|
232
|
+
meta?: Record<string, unknown>;
|
|
208
233
|
};
|
|
209
234
|
|
|
210
235
|
// PaginatorPage interface pour les résultats paginés
|
|
@@ -2229,6 +2254,7 @@ export class BaseEntity<TServerData = any> {
|
|
|
2229
2254
|
answers: ["id"],
|
|
2230
2255
|
classifieds: ["id"],
|
|
2231
2256
|
actions: ["id"],
|
|
2257
|
+
forms: ["id"],
|
|
2232
2258
|
};
|
|
2233
2259
|
|
|
2234
2260
|
const fetchKeys = (fetchKeysByEntity as Record<string, string[] | undefined>)[entityType];
|
|
@@ -3278,6 +3304,27 @@ export class BaseEntity<TServerData = any> {
|
|
|
3278
3304
|
throw new ApiError(`action n'existe pas dans ${this.constructor.name}`, 501);
|
|
3279
3305
|
}
|
|
3280
3306
|
|
|
3307
|
+
/**
|
|
3308
|
+
* Crée une instance de Form **dans le contexte costum de l'entité courante**.
|
|
3309
|
+
*
|
|
3310
|
+
* Méthode autorisée uniquement sur `Organization` et `Project` (les entités qui
|
|
3311
|
+
* portent un costumContext). Les autres entités la bloquent via un override
|
|
3312
|
+
* qui throw — cf. `User.form()`, `Event.form()`, `Poi.form()`, etc.
|
|
3313
|
+
*
|
|
3314
|
+
* @param formData - `{ id: string }` (Form n'a pas de slug)
|
|
3315
|
+
* @returns Le Form, déjà fetché (`get()` est appelé par `entity()` quand `id` est fourni).
|
|
3316
|
+
*
|
|
3317
|
+
* @example
|
|
3318
|
+
* const org = await api.organization({ slug: "navigatorDesTierslieux" });
|
|
3319
|
+
* const form = await org.form({ id: "6925e2b05dd63b02ca70d6d9" });
|
|
3320
|
+
* console.log(form.serverData.name); // "Coworking"
|
|
3321
|
+
* const answers = await form.getAnswers(); // utilise le costumContext de l'org
|
|
3322
|
+
*/
|
|
3323
|
+
async form(formData: FormInput = {}): Promise<Form> {
|
|
3324
|
+
const entity = await this.entity("forms", formData);
|
|
3325
|
+
return entity as Form;
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3281
3328
|
/**
|
|
3282
3329
|
* Récupérer les organisations d'une entitée : la liste des organisations dont l'entité est membre ou admin valide.
|
|
3283
3330
|
* Constant : GET_ORGANIZATIONS_ADMIN | GET_ORGANIZATIONS_NO_ADMIN
|
|
@@ -4279,6 +4326,16 @@ export class BaseEntity<TServerData = any> {
|
|
|
4279
4326
|
|
|
4280
4327
|
const hasStep = (d: PaginationCursor | null | undefined) => Boolean(d?.indexStep && d.indexStep > 0);
|
|
4281
4328
|
|
|
4329
|
+
// searchBy "actif" = truthy non-vide (cohérent avec `!empty($post["searchBy"])` côté PHP).
|
|
4330
|
+
// Couvre les 3 formes acceptées par le backend : "ALL", CSV ("name,slug"), array (["name", "slug"]).
|
|
4331
|
+
// Quand actif → pagination simple indexMin/indexMax (pas de ranges multi-collection).
|
|
4332
|
+
const isSearchByActive = (sb: unknown): boolean => {
|
|
4333
|
+
if (sb == null) return false;
|
|
4334
|
+
if (typeof sb === "string") return sb.length > 0;
|
|
4335
|
+
if (Array.isArray(sb)) return sb.length > 0;
|
|
4336
|
+
return false;
|
|
4337
|
+
};
|
|
4338
|
+
|
|
4282
4339
|
async function getPage(isNext = false) {
|
|
4283
4340
|
const data: PaginationCursor = { ...initialData };
|
|
4284
4341
|
|
|
@@ -4291,14 +4348,14 @@ export class BaseEntity<TServerData = any> {
|
|
|
4291
4348
|
// hydrate data pour le premier appel
|
|
4292
4349
|
data.countType = data.searchType;
|
|
4293
4350
|
|
|
4294
|
-
if (!data.searchBy && hasStep(data)) {
|
|
4351
|
+
if (!isSearchByActive(data.searchBy) && hasStep(data)) {
|
|
4295
4352
|
data.ranges = Entity._generateRanges(
|
|
4296
4353
|
data.searchType as string[],
|
|
4297
4354
|
data.indexStep as number
|
|
4298
4355
|
);
|
|
4299
4356
|
data.indexMin = data.indexMin ?? 0;
|
|
4300
4357
|
data.indexMax = data.indexMax ?? data.indexStep;
|
|
4301
|
-
} else if (data.searchBy
|
|
4358
|
+
} else if (isSearchByActive(data.searchBy) && hasStep(data)) {
|
|
4302
4359
|
data.indexMin = data.indexMin ?? 0;
|
|
4303
4360
|
data.indexMax = data.indexMax ?? data.indexStep;
|
|
4304
4361
|
}
|
|
@@ -4311,7 +4368,7 @@ export class BaseEntity<TServerData = any> {
|
|
|
4311
4368
|
if (isNext && cursor) {
|
|
4312
4369
|
state.history.push({ ...cursor });
|
|
4313
4370
|
|
|
4314
|
-
if (!cursor.searchBy && hasStep(cursor)) {
|
|
4371
|
+
if (!isSearchByActive(cursor.searchBy) && hasStep(cursor)) {
|
|
4315
4372
|
cursor.ranges = Entity._generateRanges(
|
|
4316
4373
|
cursor.searchType as string[],
|
|
4317
4374
|
cursor.indexStep as number,
|
|
@@ -4319,7 +4376,7 @@ export class BaseEntity<TServerData = any> {
|
|
|
4319
4376
|
);
|
|
4320
4377
|
cursor.indexMin = cursor.indexMax ?? 0;
|
|
4321
4378
|
cursor.indexMax = (cursor.indexMax ?? 0) + (cursor.indexStep as number);
|
|
4322
|
-
} else if (cursor.searchBy
|
|
4379
|
+
} else if (isSearchByActive(cursor.searchBy) && hasStep(cursor)) {
|
|
4323
4380
|
cursor.indexMin = cursor.indexMax ?? 0;
|
|
4324
4381
|
cursor.indexMax = (cursor.indexMax ?? 0) + (cursor.indexStep as number);
|
|
4325
4382
|
}
|
|
@@ -4410,6 +4467,10 @@ export class BaseEntity<TServerData = any> {
|
|
|
4410
4467
|
costumSlug: sd.slug,
|
|
4411
4468
|
contextId: sd.id,
|
|
4412
4469
|
contextType: this.getEntityType(),
|
|
4470
|
+
// Aliases historiques lus en fallback par le backend (cf. SearchNew::getQueries) :
|
|
4471
|
+
// `$contextId = isset($post['contextId']) ? $post['contextId'] : $post['costumId']`
|
|
4472
|
+
costumId: sd.id,
|
|
4473
|
+
costumType: this.getEntityType(),
|
|
4413
4474
|
sourceKey: [...inSourceKey, sd.slug] as string[]
|
|
4414
4475
|
} as TIn & CostumContextFields;
|
|
4415
4476
|
|
|
@@ -4452,20 +4513,48 @@ export class BaseEntity<TServerData = any> {
|
|
|
4452
4513
|
* const nextPage = await page.next();
|
|
4453
4514
|
* console.log(nextPage.pageNumber, nextPage.results.length);
|
|
4454
4515
|
* }
|
|
4516
|
+
*
|
|
4517
|
+
* @example
|
|
4518
|
+
* // Cibler l'endpoint navigator/gettl (mêmes paramètres et même format de réponse)
|
|
4519
|
+
* const page = await entity.searchCostum(
|
|
4520
|
+
* { name: "marseille", searchType: ["projects"] },
|
|
4521
|
+
* { variant: "navigator-tl" }
|
|
4522
|
+
* );
|
|
4455
4523
|
*/
|
|
4456
4524
|
async searchCostum(
|
|
4457
4525
|
data: Partial<GlobalAutocompleteCostumData> = {},
|
|
4458
|
-
options?: { restoredState?: PaginatorState }
|
|
4526
|
+
options?: { restoredState?: PaginatorState; variant?: SearchCostumVariant }
|
|
4459
4527
|
): Promise<PaginatorPage<any>> {
|
|
4528
|
+
// Le variant peut être fourni explicitement OU restauré depuis le state d'une page sérialisée.
|
|
4529
|
+
// Ainsi `JSON.stringify(page) → restorePaginationFromJSON → next()` conserve l'endpoint cible.
|
|
4530
|
+
const restoredVariant = (options?.restoredState?.meta?.variant as SearchCostumVariant | undefined);
|
|
4531
|
+
const variant: SearchCostumVariant = options?.variant ?? restoredVariant ?? "default";
|
|
4532
|
+
const endpointMethod = SEARCH_COSTUM_ENDPOINTS[variant];
|
|
4533
|
+
|
|
4460
4534
|
const paginator = this._createPaginatorEngine({
|
|
4461
4535
|
initialData: data,
|
|
4536
|
+
// Toujours "searchCostum" (la vraie méthode) — sinon `restorePaginationFromJSON`
|
|
4537
|
+
// ne pourrait pas la retrouver via `entity[methodName]`. Le variant est persisté dans `state.meta`.
|
|
4462
4538
|
methodName: "searchCostum",
|
|
4463
4539
|
restoredState: options?.restoredState,
|
|
4464
4540
|
finalizer: this._withCostumContext(
|
|
4465
|
-
(finalData: GlobalAutocompleteCostumData) =>
|
|
4541
|
+
(finalData: GlobalAutocompleteCostumData) => {
|
|
4542
|
+
// Les variants partagent le même schéma request/response côté backend
|
|
4543
|
+
// (cf. SEARCH_COSTUM_ENDPOINTS) — cast safe.
|
|
4544
|
+
const fn = this.endpointApi[endpointMethod] as typeof this.endpointApi.globalAutocompleteCostum;
|
|
4545
|
+
return fn.call(this.endpointApi, finalData);
|
|
4546
|
+
}
|
|
4466
4547
|
),
|
|
4467
4548
|
});
|
|
4468
|
-
|
|
4549
|
+
|
|
4550
|
+
const page = await paginator.next() as PaginatorPage<any>;
|
|
4551
|
+
|
|
4552
|
+
// Persiste le variant dans le state pour qu'il survive à JSON.stringify/restore.
|
|
4553
|
+
if (page._state) {
|
|
4554
|
+
page._state.meta = { ...(page._state.meta || {}), variant };
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
return page;
|
|
4469
4558
|
}
|
|
4470
4559
|
|
|
4471
4560
|
/**
|
package/src/api/Classified.ts
CHANGED
|
@@ -157,6 +157,10 @@ export class Classified extends BaseEntity<ClassifiedItemNormalized> {
|
|
|
157
157
|
throw new ApiError(`classified n'existe pas dans ${this.constructor.name}`, 501);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
override async form(): Promise<never> {
|
|
161
|
+
throw new ApiError(`form n'existe pas dans ${this.constructor.name}`, 501);
|
|
162
|
+
}
|
|
163
|
+
|
|
160
164
|
override async follow(): Promise<never> {
|
|
161
165
|
throw new ApiError(`follow n'existe pas dans ${this.constructor.name}`, 501);
|
|
162
166
|
}
|
package/src/api/Comment.ts
CHANGED
|
@@ -249,4 +249,7 @@ export class Comment extends BaseEntity<CommentItemNormalized> {
|
|
|
249
249
|
return await this.callIsConnected(() => this.endpointApi.addReportAbuse(payload));
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
override async form(): Promise<never> {
|
|
253
|
+
throw new ApiError(`form n'existe pas dans ${this.constructor.name}`, 501);
|
|
254
|
+
}
|
|
252
255
|
}
|
package/src/api/EndpointApi.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ApiAuthenticationError } from "../error.js";
|
|
3
3
|
|
|
4
4
|
import type ApiClient from "../ApiClient.js";
|
|
5
|
-
import type { PersonRegisterData, AuthenticateUrlData, RefreshTokenUrlData, PasswordRecoveryData, ServerExchangeTokenData, ChangePasswordData, DeleteAccountData, UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, UpdateBlockSlugData, CheckData, ProfilImageData, ProfilBannerData, GetElementsAboutData, MulticonnectData, GetNewsData, GetNewsByIdData, AddNewsData, AddImageNewsData, AddFileNewsData, DeleteNewsData, UpdateNewsData, ShareNewsData, GetCommentsData, AddCommentsData, DeleteCommentsData, UpdateCommentsData, SearchTagsData, ShowVoteData, GlobalAutocompleteData, CityAutocompleteData, CityAutocompleteByCountryData, SuggestionInputData, GetProjectsNoAdminData, GetProjectsAdminData, GetPoisNoAdminData, GetPoisAdminData, GetOrganizationsNoAdminData, GetOrganizationsAdminData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, DisconnectData, GetElementsKeyData, GetFavorisData, DeleteFavorisData, AddFavorisData, AddOrganizationData, AddProjectData, AddPoiData, AddEventData, DeletePoiData, DeleteEventData, DeleteElementData, AddImageElementData, LinkValidateData, SearchMemberAutocompleteData, GetNotificationsData, GetNotificationsCountData, NotificationUpdateData, MarkNotificationAsReadData, ActivitypubSearchData, ActivitypubLinkData, ActivitypubGetCommunityData, GetBadgeData, AddBadgesData, AssignBadgesData, GetEventsData, ShareEventsData, InviteEventData, FollowData, GetCostumJsonData, GlobalAutocompleteCostumData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestDatesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetGalleryData, GetAttendeesNoAdminData, GetAttendeesAdminData, CoformAnswersSearchData, CoformAnswersByIdData, GetCoformByIdData, CoformUploadAnswerFileData, CoformGetAnswerFilesData, SaveCoformAnswerData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, GenerateAnswerFromFormData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, CostumProjectActionRequestSetStatusData, CostumProjectActionRequestSetDateData, CostumProjectActionRequestSetContributorsData, CostumProjectActionRequestCancelData, CostumProjectActionRequestArchiveData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData } from "./EndpointApi.types.js";
|
|
5
|
+
import type { PersonRegisterData, AuthenticateUrlData, RefreshTokenUrlData, PasswordRecoveryData, ServerExchangeTokenData, ChangePasswordData, DeleteAccountData, UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, UpdateBlockSlugData, CheckData, ProfilImageData, ProfilBannerData, GetElementsAboutData, MulticonnectData, GetNewsData, GetNewsByIdData, AddNewsData, AddImageNewsData, AddFileNewsData, DeleteNewsData, UpdateNewsData, ShareNewsData, GetCommentsData, AddCommentsData, DeleteCommentsData, UpdateCommentsData, SearchTagsData, ShowVoteData, GlobalAutocompleteData, CityAutocompleteData, CityAutocompleteByCountryData, SuggestionInputData, GetProjectsNoAdminData, GetProjectsAdminData, GetPoisNoAdminData, GetPoisAdminData, GetOrganizationsNoAdminData, GetOrganizationsAdminData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, DisconnectData, GetElementsKeyData, GetFavorisData, DeleteFavorisData, AddFavorisData, AddOrganizationData, AddProjectData, AddPoiData, AddEventData, DeletePoiData, DeleteEventData, DeleteElementData, AddImageElementData, LinkValidateData, SearchMemberAutocompleteData, GetNotificationsData, GetNotificationsCountData, NotificationUpdateData, MarkNotificationAsReadData, ActivitypubSearchData, ActivitypubLinkData, ActivitypubGetCommunityData, GetBadgeData, AddBadgesData, AssignBadgesData, GetEventsData, ShareEventsData, InviteEventData, FollowData, GetCostumJsonData, GlobalAutocompleteCostumData, NavigatorGettlData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestDatesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetGalleryData, GetAttendeesNoAdminData, GetAttendeesAdminData, CoformAnswersSearchData, CoformAnswersByIdData, GetCoformByIdData, CoformUploadAnswerFileData, CoformGetAnswerFilesData, SaveCoformAnswerData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, GenerateAnswerFromFormData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, CostumProjectActionRequestSetStatusData, CostumProjectActionRequestSetDateData, CostumProjectActionRequestSetContributorsData, CostumProjectActionRequestCancelData, CostumProjectActionRequestArchiveData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData } from "./EndpointApi.types.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Classe EndpointApi générée automatiquement depuis endpoints-copie.json
|
|
@@ -1444,6 +1444,21 @@ export class EndpointApi {
|
|
|
1444
1444
|
return this.call("GLOBAL_AUTOCOMPLETE_COSTUM", data);
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
|
+
/**
|
|
1448
|
+
* Navigator timeline (alias de globalautocomplete) : Recherche globale via navigator/gettl — schémas request/response identiques à GLOBAL_AUTOCOMPLETE_COSTUM
|
|
1449
|
+
* Constant : NAVIGATOR_GETTL
|
|
1450
|
+
* @param data - Données envoyées à l'API
|
|
1451
|
+
* @returns Les données de réponse.
|
|
1452
|
+
* @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
|
|
1453
|
+
* @throws {Error} - En cas d'erreur inattendue.
|
|
1454
|
+
*/
|
|
1455
|
+
async navigatorGettl(data: NavigatorGettlData): Promise<any> {
|
|
1456
|
+
if (!data || typeof data !== "object") {
|
|
1457
|
+
throw new TypeError("Le paramètre data doit être un objet.");
|
|
1458
|
+
}
|
|
1459
|
+
return this.call("NAVIGATOR_GETTL", data);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1447
1462
|
/**
|
|
1448
1463
|
* Récupérer les acteurs d'événement : Récupérer les acteurs (organizers, attendees, creators, animators) d'une entité événement.
|
|
1449
1464
|
* Constant : COSTUM_EVENT_REQUEST_ACTORS
|