@communecter/cocolight-api-client 1.0.192 → 1.0.193
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.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/types/api/BaseEntity.d.ts +4 -1
- package/types/api/EndpointApi.d.ts +10 -1
- package/types/api/EndpointApi.types.d.ts +162 -0
package/package.json
CHANGED
|
@@ -72,12 +72,15 @@ type ParentLike = BaseEntity<any> & {
|
|
|
72
72
|
*
|
|
73
73
|
* - `default` → `/co2/search/globalautocomplete`
|
|
74
74
|
* - `navigator-tl` → `/costum/navigator/gettl`
|
|
75
|
+
* - `navigator-tl-ressource` → `/costum/navigator/getsressourcetl` (annuaire de ressources tiers-lieux :
|
|
76
|
+
* même payload que gettl, réponse = answers BRUTES + porteur résolu/address/geo + documents ;
|
|
77
|
+
* schéma 200 permissif — cf. NAVIGATOR_GET_RESSOURCE_TL)
|
|
75
78
|
* - `admin` → `/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true`
|
|
76
79
|
* (SearchNew::searchAdmin — réservé aux admins de l'entité porteuse : `fields` = projection
|
|
77
80
|
* EXACTE, `preferences` NON strippé → badge/filtre `toBeValidated`, tri serveur via `sort`.
|
|
78
81
|
* pathParams {type,id} posés automatiquement depuis l'entité appelante — cf. searchCostum.)
|
|
79
82
|
*/
|
|
80
|
-
export type SearchCostumVariant = "default" | "navigator-tl" | "admin";
|
|
83
|
+
export type SearchCostumVariant = "default" | "navigator-tl" | "navigator-tl-ressource" | "admin";
|
|
81
84
|
/**
|
|
82
85
|
* Types de coercion backend supportés par `UPDATE_PATH_VALUE.setType`.
|
|
83
86
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type ApiClient from "../ApiClient.js";
|
|
2
|
-
import type { DocumentListData, PersonRegisterData, AuthenticateUrlData, RefreshTokenUrlData, PasswordRecoveryData, PasswordResetData, ServerExchangeTokenData, ChangePasswordData, DeleteAccountData, UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, UpdateBlockSlugData, CheckData, ProfilImageData, ProfilBannerData, GetElementsAboutData, MulticonnectData, RelaunchInvitationData, ContactSendData, GetNewsData, GetNewsByIdData, AddNewsData, AddImageNewsData, AddFileNewsData, DeleteNewsData, UpdateNewsData, ShareNewsData, GetCommentsData, AddCommentsData, DeleteCommentsData, UpdateCommentsData, SearchTagsData, ShowVoteData, GlobalAutocompleteData, CityAutocompleteData, CityAutocompleteByCountryData, SuggestionInputData, GetProjectsNoAdminData, GetProjectsAdminData, GetPoisNoAdminData, GetPoisAdminData, GlobalAutocompleteAdminCostumData, GetOrganizationsNoAdminData, GetOrganizationsAdminData, GetUserEligiblePlacesData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, CreateInvitationLinkData, ConnectByRefData, DisconnectData, GetElementsKeyData, GetFavorisData, DeleteFavorisData, AddFavorisData, AddOrganizationData, AddProjectData, AddPoiData, AddEventData, DeleteElementData, AddImageElementData, LinkValidateData, SearchMemberAutocompleteData, GetNotificationsData, GetNotificationsCountData, NotificationUpdateData, MarkNotificationAsReadData, ActivitypubSearchData, ActivitypubLinkData, ActivitypubGetCommunityData, GetBadgeData, AddBadgesData, AssignBadgesData, GetEventsData, SearchEventsCostumData, ShareEventsData, InviteMembersData, FollowData, GetCostumJsonData, GlobalAutocompleteCostumData, NavigatorGettlData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestDatesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetGalleryData, GetAttendeesNoAdminData, GetAttendeesAdminData, CoformAnswersSearchData, CoformAnswersByIdData, GetCoformByIdData, CoformUploadAnswerFileData, DeleteCoformAnswerFileData, CoformGetAnswerFilesData, GetCoformCatalogsData, SaveCoformAnswerData, GetCoformAnswerHistoryData, GetCoformMultievalDataData, GetCoformCommontableContributorsData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, CostumFilterCoformByPathData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, CostumToolsCatalogData, CostumToolUsersData, CostumCommunInfoData, CostumSaveToolEnrichmentData, CostumCommunListData, GenerateAnswerFromFormData, GenerateProjectFromAnswerData, GenerateMilestoneFromDepenseData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, CostumProjectActionRequestSetStatusData, CostumProjectActionRequestSetDateData, CostumProjectActionRequestSetContributorsData, CostumProjectActionRequestCancelData, CostumProjectActionRequestArchiveData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData, PersonActivateData, PersonValidateInvitationData, ValidateInvitationByMailData, ImportPreviewData, ExportElementsData, ImportElementsData, GeocodageData, ValidateGroupData, SetSourceData, TransferSourceCheckData, TransferSourceApplyData, TransferSourceRollbackData, TransferSourceHistoryData, ModerateData, NewsModerateData, CommentModerateData, UploadDocumentData, ZoneGetShapeData, ZoneGetZonirisData, CostumListValuesData, CostumResolvedData, DirectoryProposalData, DirectoryProposalCountData, DirectoryProposalNewCounterData } from "./EndpointApi.types.js";
|
|
2
|
+
import type { DocumentListData, PersonRegisterData, AuthenticateUrlData, RefreshTokenUrlData, PasswordRecoveryData, PasswordResetData, ServerExchangeTokenData, ChangePasswordData, DeleteAccountData, UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, UpdateBlockSlugData, CheckData, ProfilImageData, ProfilBannerData, GetElementsAboutData, MulticonnectData, RelaunchInvitationData, ContactSendData, GetNewsData, GetNewsByIdData, AddNewsData, AddImageNewsData, AddFileNewsData, DeleteNewsData, UpdateNewsData, ShareNewsData, GetCommentsData, AddCommentsData, DeleteCommentsData, UpdateCommentsData, SearchTagsData, ShowVoteData, GlobalAutocompleteData, CityAutocompleteData, CityAutocompleteByCountryData, SuggestionInputData, GetProjectsNoAdminData, GetProjectsAdminData, GetPoisNoAdminData, GetPoisAdminData, GlobalAutocompleteAdminCostumData, GetOrganizationsNoAdminData, GetOrganizationsAdminData, GetUserEligiblePlacesData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, CreateInvitationLinkData, ConnectByRefData, DisconnectData, GetElementsKeyData, GetFavorisData, DeleteFavorisData, AddFavorisData, AddOrganizationData, AddProjectData, AddPoiData, AddEventData, DeleteElementData, AddImageElementData, LinkValidateData, SearchMemberAutocompleteData, GetNotificationsData, GetNotificationsCountData, NotificationUpdateData, MarkNotificationAsReadData, ActivitypubSearchData, ActivitypubLinkData, ActivitypubGetCommunityData, GetBadgeData, AddBadgesData, AssignBadgesData, GetEventsData, SearchEventsCostumData, ShareEventsData, InviteMembersData, FollowData, GetCostumJsonData, GlobalAutocompleteCostumData, NavigatorGettlData, NavigatorGetRessourceTlData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestDatesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetGalleryData, GetAttendeesNoAdminData, GetAttendeesAdminData, CoformAnswersSearchData, CoformAnswersByIdData, GetCoformByIdData, CoformUploadAnswerFileData, DeleteCoformAnswerFileData, CoformGetAnswerFilesData, GetCoformCatalogsData, SaveCoformAnswerData, GetCoformAnswerHistoryData, GetCoformMultievalDataData, GetCoformCommontableContributorsData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, CostumFilterCoformByPathData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, CostumToolsCatalogData, CostumToolUsersData, CostumCommunInfoData, CostumSaveToolEnrichmentData, CostumCommunListData, GenerateAnswerFromFormData, GenerateProjectFromAnswerData, GenerateMilestoneFromDepenseData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, CostumProjectActionRequestSetStatusData, CostumProjectActionRequestSetDateData, CostumProjectActionRequestSetContributorsData, CostumProjectActionRequestCancelData, CostumProjectActionRequestArchiveData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData, PersonActivateData, PersonValidateInvitationData, ValidateInvitationByMailData, ImportPreviewData, ExportElementsData, ImportElementsData, GeocodageData, ValidateGroupData, SetSourceData, TransferSourceCheckData, TransferSourceApplyData, TransferSourceRollbackData, TransferSourceHistoryData, ModerateData, NewsModerateData, CommentModerateData, UploadDocumentData, ZoneGetShapeData, ZoneGetZonirisData, CostumListValuesData, CostumResolvedData, DirectoryProposalData, DirectoryProposalCountData, DirectoryProposalNewCounterData } from "./EndpointApi.types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Classe EndpointApi générée automatiquement depuis endpoints-copie.json
|
|
5
5
|
*/
|
|
@@ -967,6 +967,15 @@ export declare class EndpointApi {
|
|
|
967
967
|
* @throws {Error} - En cas d'erreur inattendue.
|
|
968
968
|
*/
|
|
969
969
|
navigatorGettl(data: NavigatorGettlData): Promise<any>;
|
|
970
|
+
/**
|
|
971
|
+
* Annuaire de ressources tiers-lieux (navigator/getsressourcetl) : Recherche globale via navigator/getsressourcetl — payload identique à NAVIGATOR_GETTL / GLOBAL_AUTOCOMPLETE_COSTUM (drop-in de SearchNew::globalAutoComplete), suivi du post-traitement serveur Navigator::getRessourceTL : tiers-lieu porteur résolu via l input `finder` (address/geo/geoPosition remontés à la racine, finder.<parentId>.img), garde `filters[address.level1]` sur ce porteur (retirée du payload avant la recherche ; sans porteur → exclu), `documents` (photos) par réponse. `answers` reste un blob BRUT keyé par étape (PAS re-keyé par formId comme gettl). `fields` doit contenir `answers` ET `form` : sans `answers` projeté aucun porteur n est résolu (et la garde address.level1 exclut alors TOUT) ; sans `form`, le serveur se rabat sur les 3 chemins finder et seul le 1er (salles) résout (BUG-L-265).
|
|
972
|
+
* Constant : NAVIGATOR_GET_RESSOURCE_TL
|
|
973
|
+
* @param data - Données envoyées à l'API
|
|
974
|
+
* @returns Les données de réponse.
|
|
975
|
+
* @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
|
|
976
|
+
* @throws {Error} - En cas d'erreur inattendue.
|
|
977
|
+
*/
|
|
978
|
+
navigatorGetRessourceTl(data: NavigatorGetRessourceTlData): Promise<any>;
|
|
970
979
|
/**
|
|
971
980
|
* Récupérer les acteurs d'événement : Récupérer les acteurs (organizers, attendees, creators, animators) d'une entité événement.
|
|
972
981
|
* Constant : COSTUM_EVENT_REQUEST_ACTORS
|
|
@@ -4988,6 +4988,168 @@ export interface NavigatorGettlData {
|
|
|
4988
4988
|
};
|
|
4989
4989
|
[k: string]: unknown;
|
|
4990
4990
|
}
|
|
4991
|
+
export interface NavigatorGetRessourceTlData {
|
|
4992
|
+
/**
|
|
4993
|
+
* Nom ou mot-clé de la recherche
|
|
4994
|
+
*/
|
|
4995
|
+
name?: string;
|
|
4996
|
+
/**
|
|
4997
|
+
* Localités ciblées. Trois formes acceptées : object keyé (forme historique), array d'objets (forme alternative consommée par `foreach`), ou chaîne vide (placeholder = pas de filtre).
|
|
4998
|
+
*/
|
|
4999
|
+
locality?: {
|
|
5000
|
+
/**
|
|
5001
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
5002
|
+
* via the `patternProperty` "^[^\s]+$".
|
|
5003
|
+
*/
|
|
5004
|
+
[k: string]: {
|
|
5005
|
+
/**
|
|
5006
|
+
* Identifiant de la localité
|
|
5007
|
+
*/
|
|
5008
|
+
id: string;
|
|
5009
|
+
/**
|
|
5010
|
+
* Type de localité
|
|
5011
|
+
*/
|
|
5012
|
+
type: "cities" | "cp" | "country" | "level1" | "level2" | "level3" | "level4" | "level5";
|
|
5013
|
+
postalCode?: string;
|
|
5014
|
+
countryCode?: string;
|
|
5015
|
+
name?: string;
|
|
5016
|
+
level?: string | number;
|
|
5017
|
+
};
|
|
5018
|
+
} | {
|
|
5019
|
+
id: string;
|
|
5020
|
+
type: "cities" | "cp" | "country" | "level1" | "level2" | "level3" | "level4" | "level5";
|
|
5021
|
+
postalCode?: string;
|
|
5022
|
+
countryCode?: string;
|
|
5023
|
+
name?: string;
|
|
5024
|
+
level?: string | number;
|
|
5025
|
+
}[] | "";
|
|
5026
|
+
/**
|
|
5027
|
+
* Types d'entités à inclure dans la recherche
|
|
5028
|
+
*/
|
|
5029
|
+
searchType: ("NGO" | "LocalBusiness" | "Group" | "GovernmentOrganization" | "Cooperative" | "organizations" | "projects" | "events" | "citoyens" | "poi" | "news" | "answers" | "forms" | "classifieds")[];
|
|
5030
|
+
/**
|
|
5031
|
+
* Balises (tags) à utiliser pour filtrer la recherche
|
|
5032
|
+
*/
|
|
5033
|
+
searchTags?: string[];
|
|
5034
|
+
/**
|
|
5035
|
+
* Liste fixe des types à compter dans les résultats
|
|
5036
|
+
*/
|
|
5037
|
+
countType: ("NGO" | "LocalBusiness" | "Group" | "GovernmentOrganization" | "Cooperative" | "organizations" | "projects" | "events" | "citoyens" | "poi" | "news" | "answers" | "forms" | "classifieds")[];
|
|
5038
|
+
/**
|
|
5039
|
+
* Sélecteur des champs où chercher le terme `name`. Trois formes acceptées : `"ALL"` (cherche dans name/title/slug/tags/source.keys/sigle/description), chaîne CSV (`"name,slug,tags"`), ou tableau de chemins (`["name", "address.addressLocality"]`).
|
|
5040
|
+
*/
|
|
5041
|
+
searchBy?: string | [string, ...string[]];
|
|
5042
|
+
/**
|
|
5043
|
+
* Index de départ global pour la pagination
|
|
5044
|
+
*/
|
|
5045
|
+
indexMin: number;
|
|
5046
|
+
/**
|
|
5047
|
+
* Index de fin global pour la pagination
|
|
5048
|
+
*/
|
|
5049
|
+
indexMax?: number;
|
|
5050
|
+
/**
|
|
5051
|
+
* Nombre d’éléments à récupérer (limite de pagination)
|
|
5052
|
+
*/
|
|
5053
|
+
indexStep: number;
|
|
5054
|
+
/**
|
|
5055
|
+
* Configuration des plages de résultats pour chaque type de recherche
|
|
5056
|
+
*/
|
|
5057
|
+
ranges?: {
|
|
5058
|
+
/**
|
|
5059
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
5060
|
+
* via the `patternProperty` "^[^\s]+$".
|
|
5061
|
+
*/
|
|
5062
|
+
[k: string]: {
|
|
5063
|
+
/**
|
|
5064
|
+
* Index de départ pour la pagination
|
|
5065
|
+
*/
|
|
5066
|
+
indexMin: number;
|
|
5067
|
+
/**
|
|
5068
|
+
* Index de fin pour la pagination
|
|
5069
|
+
*/
|
|
5070
|
+
indexMax: number;
|
|
5071
|
+
};
|
|
5072
|
+
};
|
|
5073
|
+
/**
|
|
5074
|
+
* Type initial de la recherche, vide par défaut
|
|
5075
|
+
*/
|
|
5076
|
+
initType: "";
|
|
5077
|
+
/**
|
|
5078
|
+
* Indique si les types doivent être comptés dans les résultats
|
|
5079
|
+
*/
|
|
5080
|
+
count: true;
|
|
5081
|
+
/**
|
|
5082
|
+
* Filtres additionnels appliqués à la recherche (objet ou chaîne vide)
|
|
5083
|
+
*/
|
|
5084
|
+
filters?: {
|
|
5085
|
+
[k: string]: unknown;
|
|
5086
|
+
} | "";
|
|
5087
|
+
/**
|
|
5088
|
+
* Liste des champs à retourner
|
|
5089
|
+
*/
|
|
5090
|
+
fields?: string[];
|
|
5091
|
+
/**
|
|
5092
|
+
* Champ de tri (clé = champ, valeur = 1 ou -1)
|
|
5093
|
+
*/
|
|
5094
|
+
sortBy?: {
|
|
5095
|
+
[k: string]: 1 | -1;
|
|
5096
|
+
};
|
|
5097
|
+
/**
|
|
5098
|
+
* Indique si la recherche doit s'étendre au Fediverse (toujours désactivé)
|
|
5099
|
+
*/
|
|
5100
|
+
fediverse: boolean;
|
|
5101
|
+
/**
|
|
5102
|
+
* Indique si la recherche est effectuée à partir d'une carte (toujours désactivé)
|
|
5103
|
+
*/
|
|
5104
|
+
mapUsed?: true;
|
|
5105
|
+
/**
|
|
5106
|
+
* Indique si on doit exclure les éléments avec une source
|
|
5107
|
+
*/
|
|
5108
|
+
notSourceKey?: true;
|
|
5109
|
+
/**
|
|
5110
|
+
* ID du contexte de recherche (actuellement vide)
|
|
5111
|
+
*/
|
|
5112
|
+
contextId?: string;
|
|
5113
|
+
/**
|
|
5114
|
+
* Type de contexte de recherche (actuellement vide)
|
|
5115
|
+
*/
|
|
5116
|
+
contextType?: "projects" | "organizations";
|
|
5117
|
+
/**
|
|
5118
|
+
* Slug du costume utilisé pour la recherche
|
|
5119
|
+
*/
|
|
5120
|
+
costumSlug: string;
|
|
5121
|
+
/**
|
|
5122
|
+
* Alias historique de `contextId` — id du contexte costum. Le backend lit l'un OU l'autre (`isset($post['contextId']) ? ... : $post['costumId']`).
|
|
5123
|
+
*/
|
|
5124
|
+
costumId?: string;
|
|
5125
|
+
/**
|
|
5126
|
+
* Alias historique de `contextType` — type du contexte costum.
|
|
5127
|
+
*/
|
|
5128
|
+
costumType?: "projects" | "organizations";
|
|
5129
|
+
/**
|
|
5130
|
+
* Mode d'affichage / comportement côté backend. Valeurs observées : `table` (charge `creatorData`), `mapWithDirectory`. String libre.
|
|
5131
|
+
*/
|
|
5132
|
+
mode?: string;
|
|
5133
|
+
/**
|
|
5134
|
+
* Clés de source pour la recherche
|
|
5135
|
+
*/
|
|
5136
|
+
sourceKey?: string[];
|
|
5137
|
+
/**
|
|
5138
|
+
* Indique si le mode d'édition du costume est activé (toujours désactivé)
|
|
5139
|
+
*/
|
|
5140
|
+
costumEditMode: boolean;
|
|
5141
|
+
options?: {
|
|
5142
|
+
tags?: {
|
|
5143
|
+
/**
|
|
5144
|
+
* Verbe d'action pour le filtre de recherche
|
|
5145
|
+
*/
|
|
5146
|
+
verb?: string;
|
|
5147
|
+
[k: string]: unknown;
|
|
5148
|
+
};
|
|
5149
|
+
[k: string]: unknown;
|
|
5150
|
+
};
|
|
5151
|
+
[k: string]: unknown;
|
|
5152
|
+
}
|
|
4991
5153
|
export interface CostumEventRequestActorsData {
|
|
4992
5154
|
/**
|
|
4993
5155
|
* Types de liens à inclure (ex: organizer, attendees, creator, animator)
|