@communecter/cocolight-api-client 1.0.120 → 1.0.121
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.ts +26 -8
- package/src/api/EndpointApi.ts +16 -1
- package/src/api/EndpointApi.types.ts +21 -0
- package/src/api/serverDataType/Country.ts +1 -0
- package/src/endpoints.module.ts +1 -1
- package/src/index.ts +1 -0
- package/types/api/BaseEntity.d.ts +14 -1
- package/types/api/EndpointApi.d.ts +10 -1
- package/types/api/EndpointApi.types.d.ts +19 -0
- package/types/api/serverDataType/Country.d.ts +1 -0
- package/types/endpoints.module.d.ts +198 -0
- package/types/index.d.ts +1 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, GetNewsData, GetGalleryData, GlobalAutocompleteCostumData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestDatesData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetOrganizationsAdminData, GetOrganizationsNoAdminData, GetProjectsAdminData, GetProjectsNoAdminData, GetPoisAdminData, GetPoisNoAdminData, GetSubscribersData, GetBadgesData, CoformAnswersSearchData, SearchMemberAutocompleteData, GetEventsData, CostumFilterCoformData, SearchZonesData } from "./EndpointApi.types.js";
|
|
1
|
+
import type { UpdateSettingsData, UpdateBlockDescriptionData, UpdateBlockInfoData, UpdateBlockSocialData, UpdateBlockLocalityData, GetNewsData, GetGalleryData, GlobalAutocompleteCostumData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestDatesData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetOrganizationsAdminData, GetOrganizationsNoAdminData, GetProjectsAdminData, GetProjectsNoAdminData, GetPoisAdminData, GetPoisNoAdminData, GetSubscribersData, GetBadgesData, CoformAnswersSearchData, SearchMemberAutocompleteData, GetEventsData, CostumFilterCoformData, GetCountriesData, SearchZonesData } from "./EndpointApi.types.js";
|
|
2
2
|
import type { TransformsMap } from "../types/entities.js";
|
|
3
|
+
import type { CountryItem } from "./serverDataType/Country.js";
|
|
3
4
|
import type { ZoneItemNormalized } from "./serverDataType/Zone.js";
|
|
4
5
|
/**
|
|
5
6
|
* Types pour les méthodes d'entité (organization, project, poi, event, badge, news)
|
|
@@ -1652,6 +1653,18 @@ export declare class BaseEntity<TServerData = any> {
|
|
|
1652
1653
|
* @throws {ApiError} Si `countryCode` ou `level` sont absents
|
|
1653
1654
|
*/
|
|
1654
1655
|
searchZone(data: SearchZonesData): Promise<ZoneItemNormalized[]>;
|
|
1656
|
+
/**
|
|
1657
|
+
* Récupère la liste de tous les pays (endpoint public, sans authentification).
|
|
1658
|
+
*
|
|
1659
|
+
* @param data - Paramètres optionnels (costumSlug, costumId, costumType)
|
|
1660
|
+
* @returns Liste des pays `{ name, countryCode, level, geo, ... }`
|
|
1661
|
+
*
|
|
1662
|
+
* @example
|
|
1663
|
+
* const countries = await organization.getCountries();
|
|
1664
|
+
* countries[0].name; // "France"
|
|
1665
|
+
* countries[0].countryCode; // "FR"
|
|
1666
|
+
*/
|
|
1667
|
+
getCountries(data?: Partial<GetCountriesData>): Promise<CountryItem[]>;
|
|
1655
1668
|
/**
|
|
1656
1669
|
* ───────────────────────────────
|
|
1657
1670
|
* Pagination restoration methods
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type ApiClient from "../ApiClient.js";
|
|
2
|
-
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, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DemoteAdminData, CostumFilterCoformData, SearchZonesData } from "./EndpointApi.types.js";
|
|
2
|
+
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, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DemoteAdminData, CostumFilterCoformData, GetCountriesData, SearchZonesData } from "./EndpointApi.types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Classe EndpointApi générée automatiquement depuis endpoints-copie.json
|
|
5
5
|
*/
|
|
@@ -1068,6 +1068,15 @@ export declare class EndpointApi {
|
|
|
1068
1068
|
* @throws {Error} - En cas d'erreur inattendue.
|
|
1069
1069
|
*/
|
|
1070
1070
|
costumFilterCoform(data: CostumFilterCoformData): Promise<any>;
|
|
1071
|
+
/**
|
|
1072
|
+
* Récupérer la liste des pays : Récupérer la liste de tous les pays
|
|
1073
|
+
* Constant : GET_COUNTRIES
|
|
1074
|
+
* @param data - Données envoyées à l'API
|
|
1075
|
+
* @returns Les données de réponse.
|
|
1076
|
+
* @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
|
|
1077
|
+
* @throws {Error} - En cas d'erreur inattendue.
|
|
1078
|
+
*/
|
|
1079
|
+
getCountries(data: GetCountriesData): Promise<any>;
|
|
1071
1080
|
/**
|
|
1072
1081
|
* Rechercher des zones géographiques : Rechercher des zones géographiques
|
|
1073
1082
|
* Constant : SEARCH_ZONES
|
|
@@ -4571,6 +4571,25 @@ export interface CostumFilterCoformData {
|
|
|
4571
4571
|
costumType?: string;
|
|
4572
4572
|
[k: string]: unknown;
|
|
4573
4573
|
}
|
|
4574
|
+
export interface GetCountriesData {
|
|
4575
|
+
/**
|
|
4576
|
+
* Slug personnalisé
|
|
4577
|
+
*/
|
|
4578
|
+
costumSlug?: string;
|
|
4579
|
+
/**
|
|
4580
|
+
* Mode édition personnalisé (boolean, string ou number)
|
|
4581
|
+
*/
|
|
4582
|
+
costumEditMode?: ("true" | "false") | (0 | 1) | boolean;
|
|
4583
|
+
/**
|
|
4584
|
+
* ID personnalisé (format ObjectID MongoDB)
|
|
4585
|
+
*/
|
|
4586
|
+
costumId?: string;
|
|
4587
|
+
/**
|
|
4588
|
+
* Type de collection
|
|
4589
|
+
*/
|
|
4590
|
+
costumType?: "organizations" | "projects" | "events" | "citoyens" | "poi";
|
|
4591
|
+
[k: string]: unknown;
|
|
4592
|
+
}
|
|
4574
4593
|
export interface SearchZonesData {
|
|
4575
4594
|
/**
|
|
4576
4595
|
* Code du pays pour la recherche
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ZoneItemNormalized as CountryItem } from "./Zone.js";
|
|
@@ -23743,6 +23743,204 @@ declare const endpoints: {
|
|
|
23743
23743
|
pathParams?: undefined;
|
|
23744
23744
|
params?: undefined;
|
|
23745
23745
|
functionCocostum?: undefined;
|
|
23746
|
+
} | {
|
|
23747
|
+
auth: string;
|
|
23748
|
+
constant: string;
|
|
23749
|
+
contentType: string;
|
|
23750
|
+
method: string;
|
|
23751
|
+
path: string;
|
|
23752
|
+
request: {
|
|
23753
|
+
additionalProperties: boolean;
|
|
23754
|
+
properties: {
|
|
23755
|
+
costumEditMode: {
|
|
23756
|
+
oneOf: ({
|
|
23757
|
+
type: string;
|
|
23758
|
+
} | {
|
|
23759
|
+
enum: string[];
|
|
23760
|
+
type: string;
|
|
23761
|
+
} | {
|
|
23762
|
+
enum: number[];
|
|
23763
|
+
type: string;
|
|
23764
|
+
})[];
|
|
23765
|
+
};
|
|
23766
|
+
costumId: {
|
|
23767
|
+
pattern: string;
|
|
23768
|
+
type: string;
|
|
23769
|
+
};
|
|
23770
|
+
costumSlug: {
|
|
23771
|
+
type: string;
|
|
23772
|
+
};
|
|
23773
|
+
costumType: {
|
|
23774
|
+
enum: string[];
|
|
23775
|
+
type: string;
|
|
23776
|
+
};
|
|
23777
|
+
app?: undefined;
|
|
23778
|
+
email?: undefined;
|
|
23779
|
+
isInvitation?: undefined;
|
|
23780
|
+
mode?: undefined;
|
|
23781
|
+
name?: undefined;
|
|
23782
|
+
pendingUserId?: undefined;
|
|
23783
|
+
pwd?: undefined;
|
|
23784
|
+
username?: undefined;
|
|
23785
|
+
password?: undefined;
|
|
23786
|
+
refreshToken?: undefined;
|
|
23787
|
+
type?: undefined;
|
|
23788
|
+
serverUrl?: undefined;
|
|
23789
|
+
newPassword?: undefined;
|
|
23790
|
+
newPassword2?: undefined;
|
|
23791
|
+
oldPassword?: undefined;
|
|
23792
|
+
scope?: undefined;
|
|
23793
|
+
userId?: undefined;
|
|
23794
|
+
idEntity?: undefined;
|
|
23795
|
+
typeEntity?: undefined;
|
|
23796
|
+
value?: undefined;
|
|
23797
|
+
block?: undefined;
|
|
23798
|
+
descMentions?: undefined;
|
|
23799
|
+
description?: undefined;
|
|
23800
|
+
id?: undefined;
|
|
23801
|
+
shortDescription?: undefined;
|
|
23802
|
+
typeElement?: undefined;
|
|
23803
|
+
diaspora?: undefined;
|
|
23804
|
+
facebook?: undefined;
|
|
23805
|
+
github?: undefined;
|
|
23806
|
+
gitlab?: undefined;
|
|
23807
|
+
instagram?: undefined;
|
|
23808
|
+
mastodon?: undefined;
|
|
23809
|
+
signal?: undefined;
|
|
23810
|
+
telegram?: undefined;
|
|
23811
|
+
twitter?: undefined;
|
|
23812
|
+
address?: undefined;
|
|
23813
|
+
geo?: undefined;
|
|
23814
|
+
geoPosition?: undefined;
|
|
23815
|
+
slug?: undefined;
|
|
23816
|
+
profil_avatar?: undefined;
|
|
23817
|
+
banner?: undefined;
|
|
23818
|
+
cropH?: undefined;
|
|
23819
|
+
cropW?: undefined;
|
|
23820
|
+
cropX?: undefined;
|
|
23821
|
+
cropY?: undefined;
|
|
23822
|
+
formOrigin?: undefined;
|
|
23823
|
+
parentId?: undefined;
|
|
23824
|
+
parentType?: undefined;
|
|
23825
|
+
tpl?: undefined;
|
|
23826
|
+
listInvite?: undefined;
|
|
23827
|
+
dateLimit?: undefined;
|
|
23828
|
+
indexStep?: undefined;
|
|
23829
|
+
search?: undefined;
|
|
23830
|
+
ids?: undefined;
|
|
23831
|
+
json?: undefined;
|
|
23832
|
+
markdownActive?: undefined;
|
|
23833
|
+
mediaFile?: undefined;
|
|
23834
|
+
mediaImg?: undefined;
|
|
23835
|
+
mentions?: undefined;
|
|
23836
|
+
tags?: undefined;
|
|
23837
|
+
text?: undefined;
|
|
23838
|
+
newsImage?: undefined;
|
|
23839
|
+
newsFile?: undefined;
|
|
23840
|
+
isLive?: undefined;
|
|
23841
|
+
idNews?: undefined;
|
|
23842
|
+
childId?: undefined;
|
|
23843
|
+
childType?: undefined;
|
|
23844
|
+
comment?: undefined;
|
|
23845
|
+
connectType?: undefined;
|
|
23846
|
+
argval?: undefined;
|
|
23847
|
+
contextId?: undefined;
|
|
23848
|
+
contextType?: undefined;
|
|
23849
|
+
parentCommentId?: undefined;
|
|
23850
|
+
path?: undefined;
|
|
23851
|
+
params?: undefined;
|
|
23852
|
+
count?: undefined;
|
|
23853
|
+
countType?: undefined;
|
|
23854
|
+
fediverse?: undefined;
|
|
23855
|
+
filters?: undefined;
|
|
23856
|
+
indexMax?: undefined;
|
|
23857
|
+
indexMin?: undefined;
|
|
23858
|
+
initType?: undefined;
|
|
23859
|
+
locality?: undefined;
|
|
23860
|
+
notSourceKey?: undefined;
|
|
23861
|
+
ranges?: undefined;
|
|
23862
|
+
searchBy?: undefined;
|
|
23863
|
+
searchTags?: undefined;
|
|
23864
|
+
searchType?: undefined;
|
|
23865
|
+
countryCode?: undefined;
|
|
23866
|
+
formInMap?: undefined;
|
|
23867
|
+
scopeValue?: undefined;
|
|
23868
|
+
fields?: undefined;
|
|
23869
|
+
collection?: undefined;
|
|
23870
|
+
pull?: undefined;
|
|
23871
|
+
arrayForm?: undefined;
|
|
23872
|
+
key?: undefined;
|
|
23873
|
+
preferences?: undefined;
|
|
23874
|
+
role?: undefined;
|
|
23875
|
+
url?: undefined;
|
|
23876
|
+
parent?: undefined;
|
|
23877
|
+
public?: undefined;
|
|
23878
|
+
urls?: undefined;
|
|
23879
|
+
endDate?: undefined;
|
|
23880
|
+
openingHours?: undefined;
|
|
23881
|
+
organizer?: undefined;
|
|
23882
|
+
recurrency?: undefined;
|
|
23883
|
+
startDate?: undefined;
|
|
23884
|
+
timeZone?: undefined;
|
|
23885
|
+
qqfile?: undefined;
|
|
23886
|
+
qqfilename?: undefined;
|
|
23887
|
+
qqtotalfilesize?: undefined;
|
|
23888
|
+
qquuid?: undefined;
|
|
23889
|
+
linkOption?: undefined;
|
|
23890
|
+
searchMode?: undefined;
|
|
23891
|
+
refreshTimestamp?: undefined;
|
|
23892
|
+
action?: undefined;
|
|
23893
|
+
all?: undefined;
|
|
23894
|
+
actor?: undefined;
|
|
23895
|
+
payload?: undefined;
|
|
23896
|
+
criteria?: undefined;
|
|
23897
|
+
isParcours?: undefined;
|
|
23898
|
+
issuer?: undefined;
|
|
23899
|
+
award?: undefined;
|
|
23900
|
+
badgeId?: undefined;
|
|
23901
|
+
evidences?: undefined;
|
|
23902
|
+
narative?: undefined;
|
|
23903
|
+
endDateUTC?: undefined;
|
|
23904
|
+
startDateUTC?: undefined;
|
|
23905
|
+
mapUsed?: undefined;
|
|
23906
|
+
options?: undefined;
|
|
23907
|
+
sortBy?: undefined;
|
|
23908
|
+
sourceKey?: undefined;
|
|
23909
|
+
parent_only?: undefined;
|
|
23910
|
+
types?: undefined;
|
|
23911
|
+
date?: undefined;
|
|
23912
|
+
fromToday?: undefined;
|
|
23913
|
+
regions?: undefined;
|
|
23914
|
+
timezone?: undefined;
|
|
23915
|
+
event?: undefined;
|
|
23916
|
+
tl?: undefined;
|
|
23917
|
+
contentKey?: undefined;
|
|
23918
|
+
folderId?: undefined;
|
|
23919
|
+
answerId?: undefined;
|
|
23920
|
+
finderPath?: undefined;
|
|
23921
|
+
details?: undefined;
|
|
23922
|
+
connect?: undefined;
|
|
23923
|
+
isAdmin?: undefined;
|
|
23924
|
+
searchedData?: undefined;
|
|
23925
|
+
level?: undefined;
|
|
23926
|
+
upperLevelId?: undefined;
|
|
23927
|
+
};
|
|
23928
|
+
type: string;
|
|
23929
|
+
required?: undefined;
|
|
23930
|
+
allOf?: undefined;
|
|
23931
|
+
$defs?: undefined;
|
|
23932
|
+
else?: undefined;
|
|
23933
|
+
if?: undefined;
|
|
23934
|
+
then?: undefined;
|
|
23935
|
+
anyOf?: undefined;
|
|
23936
|
+
startBeforeEnd?: undefined;
|
|
23937
|
+
};
|
|
23938
|
+
generateModule?: undefined;
|
|
23939
|
+
onlyAuthNone?: undefined;
|
|
23940
|
+
postActions?: undefined;
|
|
23941
|
+
pathParams?: undefined;
|
|
23942
|
+
params?: undefined;
|
|
23943
|
+
functionCocostum?: undefined;
|
|
23746
23944
|
} | {
|
|
23747
23945
|
constant: string;
|
|
23748
23946
|
contentType: string;
|
package/types/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ export type * from "./api/serverDataType/News.js";
|
|
|
67
67
|
export type * from "./api/serverDataType/Comment.js";
|
|
68
68
|
export type * from "./api/serverDataType/Answer.js";
|
|
69
69
|
export type * from "./api/serverDataType/common.js";
|
|
70
|
+
export type * from "./api/serverDataType/Country.js";
|
|
70
71
|
export type * from "./api/serverDataType/Zone.js";
|
|
71
72
|
export type { PaginatorPage, PaginatorState } from "./api/BaseEntity.js";
|
|
72
73
|
export type * from "./types/index.js";
|