@communecter/cocolight-api-client 1.0.153 → 1.0.155

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.
@@ -1709,6 +1709,28 @@ export declare class BaseEntity<TServerData = any> {
1709
1709
  * @throws {ApiError} - Si l'utilisateur n'est pas connecté ou si l'entité n'est pas enregistrée.
1710
1710
  */
1711
1711
  unfollow(): Promise<unknown>;
1712
+ /**
1713
+ * Invite des personnes PAR EMAIL à rejoindre CETTE entité (organisation, projet ou événement).
1714
+ *
1715
+ * Méthode de haut niveau à PRÉFÉRER à un appel direct `endpointApi.inviteMembers`.
1716
+ * Wrappe INVITE_MEMBERS (POST /co2/link/multiconnect, `listInvite.invites`) : le backend
1717
+ * crée un citoyen « pending » par email puis envoie un mail d'invitation. Les clés des
1718
+ * invités sont des UUID v4 générés ici (le contrat l'exige).
1719
+ *
1720
+ * @param invites - Liste d'invités `{ name, mail, msg?, isAdmin?, roles? }` (clé `mail`,
1721
+ * comme le legacy `Link::invite` ; `isAdmin:"admin"` pour inviter en admin).
1722
+ * @returns Réponse de l'API (par invité : citoyens/invites/organizations).
1723
+ * @throws {ApiError} Si l'entité n'a pas d'id, n'est pas une orga/projet/événement, ou liste vide.
1724
+ */
1725
+ inviteByEmail(invites: Array<{
1726
+ name: string;
1727
+ mail: string;
1728
+ msg?: string;
1729
+ isAdmin?: "" | "admin";
1730
+ roles?: string[];
1731
+ }>): Promise<unknown>;
1732
+ /** UUID v4 compatible browser + Node (`crypto.randomUUID()` si dispo, sinon fallback). @private */
1733
+ private _uuidV4;
1712
1734
  /**
1713
1735
  * Vérifie si l'utilisateur est connecté et a accès à l'entité.
1714
1736
  *
@@ -2115,7 +2137,7 @@ export declare class BaseEntity<TServerData = any> {
2115
2137
  * @throws {ApiResponseError}
2116
2138
  * @throws {Error}
2117
2139
  */
2118
- costumEventRequestLoadContextTag(data?: Partial<Omit<CostumEventRequestLoadContextTagData, "pathParams">>): Promise<unknown>;
2140
+ costumEventRequestLoadContextTag(data: Partial<Omit<CostumEventRequestLoadContextTagData, "pathParams" | "event">> & Pick<CostumEventRequestLoadContextTagData, "event">): Promise<unknown>;
2119
2141
  /**
2120
2142
  * Recherche paginée des réponses CoForm liées à l'entité courante.
2121
2143
  * Injecte automatiquement le contexte (costumSlug, contextId, contextType) via `_withCostumContext`,
@@ -1,5 +1,5 @@
1
1
  import type ApiClient from "../ApiClient.js";
2
- import type { DocumentListData, 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, GetUserEligiblePlacesData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, 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, InviteEventData, FollowData, GetCostumJsonData, GlobalAutocompleteCostumData, NavigatorGettlData, CostumEventRequestActorsData, CostumEventRequestSubeventsData, CostumEventRequestElementEventData, CostumEventRequestCategoriesData, CostumEventRequestDatesData, CostumEventRequestEventData, CostumEventRequestLinkTlToEventData, CostumEventRequestLoadContextTagData, GetGalleryData, GetAttendeesNoAdminData, GetAttendeesAdminData, CoformAnswersSearchData, CoformAnswersByIdData, GetCoformByIdData, CoformUploadAnswerFileData, CoformGetAnswerFilesData, GetCoformCatalogsData, SaveCoformAnswerData, GetCoformAnswerHistoryData, GetCoformMultievalDataData, GetCoformCommontableContributorsData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, CostumFilterCoformByPathData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, GenerateAnswerFromFormData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, CostumProjectActionRequestSetStatusData, CostumProjectActionRequestSetDateData, CostumProjectActionRequestSetContributorsData, CostumProjectActionRequestCancelData, CostumProjectActionRequestArchiveData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData, PersonActivateData } from "./EndpointApi.types.js";
2
+ import type { DocumentListData, 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, GetUserEligiblePlacesData, GetMembersNoAdminData, GetMembersAdminData, GetFriendsAdminData, GetSubscriptionsData, GetSubscriptionsAdminData, GetSubscribersData, GetSubscribersAdminData, GetContributorsNoAdminData, GetContributorsAdminData, GetBadgesData, GetBadgesFiltersData, ConnectData, 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, CoformGetAnswerFilesData, GetCoformCatalogsData, SaveCoformAnswerData, GetCoformAnswerHistoryData, GetCoformMultievalDataData, GetCoformCommontableContributorsData, AddVoteData, AddReportAbuseData, UpdatePathValueData, DeleteDocumentByContextData, DeleteDocumentByIdData, DemoteAdminData, CostumFilterCoformData, CostumFilterCoformByPathData, GetCountriesData, SearchZonesData, CoformAnswersByFormsData, GenerateAnswerFromFormData, FundingEnvelopeData, CoremuOperationData, CostumProjectActionRequestNewData, CostumProjectActionRequestSetStatusData, CostumProjectActionRequestSetDateData, CostumProjectActionRequestSetContributorsData, CostumProjectActionRequestCancelData, CostumProjectActionRequestArchiveData, LinkDiscourseAccountData, UnlinkDiscourseAccountData, DiscourseProfileData, DiscourseCheckEmailData, DiscourseDismissLinkData, LinkMediawikiAccountData, UnlinkMediawikiAccountData, GetMediawikiContributionsData, AddClassifiedData, PersonActivateData } from "./EndpointApi.types.js";
3
3
  /**
4
4
  * Classe EndpointApi générée automatiquement depuis endpoints-copie.json
5
5
  */
@@ -863,15 +863,15 @@ export declare class EndpointApi {
863
863
  */
864
864
  shareEvents(data: ShareEventsData): Promise<any>;
865
865
  /**
866
- * Inviter des participants à un événement : Invite plusieurs utilisateurs ou entités à participer à un événement.
867
- * Constant : INVITE_EVENT
866
+ * Inviter des personnes (organisation / projet / événement) : Invite des personnes à rejoindre une organisation, un projet ou un événement : nouvelles par email (`listInvite.invites` → crée des comptes citoyens « pending » + mail d'invitation) ou existantes par id (`listInvite.citoyens`/`organizations`). Membre / contributeur / participant selon le parent ; `isAdmin:"admin"` pour inviter en admin. Port de Link::invite (multiconnect).
867
+ * Constant : INVITE_MEMBERS
868
868
  * @param data - Données envoyées à l'API
869
869
  * @returns Les données de réponse.
870
870
  * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
871
871
  * @throws {ApiAuthenticationError} - En cas d'erreur d'authentification.
872
872
  * @throws {Error} - En cas d'erreur inattendue.
873
873
  */
874
- inviteEvent(data: InviteEventData): Promise<any>;
874
+ inviteMembers(data: InviteMembersData): Promise<any>;
875
875
  /**
876
876
  * Suivre un utilisateur ou un élément : Suivre un utilisateur ou un élément.
877
877
  * Constant : FOLLOW
@@ -430,7 +430,7 @@ export interface MulticonnectData {
430
430
  /**
431
431
  * Type de l'entité parente
432
432
  */
433
- parentType: "citoyens" | "projects" | "organizations";
433
+ parentType: "citoyens" | "projects" | "organizations" | "events";
434
434
  /**
435
435
  * Liste des citoyens invités
436
436
  */
@@ -3830,7 +3830,7 @@ export interface ShareEventsData {
3830
3830
  comment?: string;
3831
3831
  [k: string]: unknown;
3832
3832
  }
3833
- export interface InviteEventData {
3833
+ export interface InviteMembersData {
3834
3834
  /**
3835
3835
  * ID de l'entité parente
3836
3836
  */
@@ -3838,7 +3838,7 @@ export interface InviteEventData {
3838
3838
  /**
3839
3839
  * Type de l'entité parente
3840
3840
  */
3841
- parentType: "citoyens" | "projects" | "organizations";
3841
+ parentType: "citoyens" | "projects" | "organizations" | "events";
3842
3842
  /**
3843
3843
  * Liste des citoyens invités
3844
3844
  */
@@ -4397,6 +4397,14 @@ export interface CostumEventRequestSubeventsData {
4397
4397
  [k: string]: unknown;
4398
4398
  }
4399
4399
  export interface CostumEventRequestElementEventData {
4400
+ /**
4401
+ * ID de l’élément dont on récupère les événements liés (lu dans le BODY — EventAction::run element_event lit $_POST["id"], ignore le path)
4402
+ */
4403
+ id?: string;
4404
+ /**
4405
+ * Type/collection de l’élément (lu dans le BODY — $_POST["type"])
4406
+ */
4407
+ type?: string;
4400
4408
  /**
4401
4409
  * ID du contexte de recherche (actuellement vide)
4402
4410
  */
@@ -4656,7 +4664,7 @@ export interface CostumEventRequestLoadContextTagData {
4656
4664
  /**
4657
4665
  * ID de l’événement
4658
4666
  */
4659
- event?: string;
4667
+ event: string;
4660
4668
  /**
4661
4669
  * Recherche textuelle dans les tags
4662
4670
  */
@@ -24624,6 +24624,279 @@ declare const endpoints: {
24624
24624
  onlyAuthNone?: undefined;
24625
24625
  postActions?: undefined;
24626
24626
  params?: undefined;
24627
+ } | {
24628
+ auth: string;
24629
+ constant: string;
24630
+ contentType: string;
24631
+ functionCocostum: string;
24632
+ method: string;
24633
+ path: string;
24634
+ pathParams: {
24635
+ additionalProperties: boolean;
24636
+ properties: {
24637
+ id: {
24638
+ pattern: string;
24639
+ type: string;
24640
+ };
24641
+ type: {
24642
+ default: string;
24643
+ type: string;
24644
+ };
24645
+ };
24646
+ required: string[];
24647
+ type: string;
24648
+ };
24649
+ request: {
24650
+ additionalProperties: boolean;
24651
+ properties: {
24652
+ contextId: {
24653
+ pattern: string;
24654
+ type: string;
24655
+ };
24656
+ contextType: {
24657
+ enum: string[];
24658
+ type: string;
24659
+ };
24660
+ costumEditMode: {
24661
+ default: boolean;
24662
+ type: string;
24663
+ };
24664
+ costumId: {
24665
+ pattern: string;
24666
+ type: string;
24667
+ };
24668
+ costumSlug: {
24669
+ type: string;
24670
+ };
24671
+ costumType: {
24672
+ enum: string[];
24673
+ type: string;
24674
+ };
24675
+ id: {
24676
+ pattern: string;
24677
+ type: string;
24678
+ };
24679
+ mode: {
24680
+ type: string;
24681
+ };
24682
+ sourceKey: {
24683
+ items: {
24684
+ type: string;
24685
+ };
24686
+ type: string;
24687
+ };
24688
+ type: {
24689
+ type: string;
24690
+ };
24691
+ app?: undefined;
24692
+ email?: undefined;
24693
+ isInvitation?: undefined;
24694
+ name?: undefined;
24695
+ pendingUserId?: undefined;
24696
+ pwd?: undefined;
24697
+ username?: undefined;
24698
+ password?: undefined;
24699
+ refreshToken?: undefined;
24700
+ serverUrl?: undefined;
24701
+ newPassword?: undefined;
24702
+ newPassword2?: undefined;
24703
+ oldPassword?: undefined;
24704
+ scope?: undefined;
24705
+ userId?: undefined;
24706
+ idEntity?: undefined;
24707
+ typeEntity?: undefined;
24708
+ value?: undefined;
24709
+ block?: undefined;
24710
+ descMentions?: undefined;
24711
+ description?: undefined;
24712
+ shortDescription?: undefined;
24713
+ typeElement?: undefined;
24714
+ diaspora?: undefined;
24715
+ facebook?: undefined;
24716
+ github?: undefined;
24717
+ gitlab?: undefined;
24718
+ instagram?: undefined;
24719
+ mastodon?: undefined;
24720
+ signal?: undefined;
24721
+ telegram?: undefined;
24722
+ twitter?: undefined;
24723
+ address?: undefined;
24724
+ geo?: undefined;
24725
+ geoPosition?: undefined;
24726
+ slug?: undefined;
24727
+ profil_avatar?: undefined;
24728
+ banner?: undefined;
24729
+ cropH?: undefined;
24730
+ cropW?: undefined;
24731
+ cropX?: undefined;
24732
+ cropY?: undefined;
24733
+ formOrigin?: undefined;
24734
+ parentId?: undefined;
24735
+ parentType?: undefined;
24736
+ tpl?: undefined;
24737
+ listInvite?: undefined;
24738
+ dateLimit?: undefined;
24739
+ indexStep?: undefined;
24740
+ search?: undefined;
24741
+ ids?: undefined;
24742
+ json?: undefined;
24743
+ markdownActive?: undefined;
24744
+ mediaFile?: undefined;
24745
+ mediaImg?: undefined;
24746
+ mentions?: undefined;
24747
+ tags?: undefined;
24748
+ text?: undefined;
24749
+ newsImage?: undefined;
24750
+ newsFile?: undefined;
24751
+ isLive?: undefined;
24752
+ idNews?: undefined;
24753
+ childId?: undefined;
24754
+ childType?: undefined;
24755
+ comment?: undefined;
24756
+ connectType?: undefined;
24757
+ argval?: undefined;
24758
+ parentCommentId?: undefined;
24759
+ path?: undefined;
24760
+ params?: undefined;
24761
+ count?: undefined;
24762
+ countType?: undefined;
24763
+ fediverse?: undefined;
24764
+ filters?: undefined;
24765
+ indexMax?: undefined;
24766
+ indexMin?: undefined;
24767
+ initType?: undefined;
24768
+ locality?: undefined;
24769
+ notSourceKey?: undefined;
24770
+ ranges?: undefined;
24771
+ searchBy?: undefined;
24772
+ searchTags?: undefined;
24773
+ searchType?: undefined;
24774
+ countryCode?: undefined;
24775
+ formInMap?: undefined;
24776
+ scopeValue?: undefined;
24777
+ fields?: undefined;
24778
+ collection?: undefined;
24779
+ pull?: undefined;
24780
+ arrayForm?: undefined;
24781
+ filiere?: undefined;
24782
+ key?: undefined;
24783
+ mainTag?: undefined;
24784
+ openingHours?: undefined;
24785
+ preferences?: undefined;
24786
+ role?: undefined;
24787
+ socialNetwork?: undefined;
24788
+ telephone?: undefined;
24789
+ thematic?: undefined;
24790
+ url?: undefined;
24791
+ video?: undefined;
24792
+ parent?: undefined;
24793
+ public?: undefined;
24794
+ source?: undefined;
24795
+ urls?: undefined;
24796
+ endDate?: undefined;
24797
+ organizer?: undefined;
24798
+ recurrency?: undefined;
24799
+ startDate?: undefined;
24800
+ timeZone?: undefined;
24801
+ qqfile?: undefined;
24802
+ qqfilename?: undefined;
24803
+ qqtotalfilesize?: undefined;
24804
+ qquuid?: undefined;
24805
+ linkOption?: undefined;
24806
+ searchMode?: undefined;
24807
+ refreshTimestamp?: undefined;
24808
+ action?: undefined;
24809
+ all?: undefined;
24810
+ actor?: undefined;
24811
+ payload?: undefined;
24812
+ criteria?: undefined;
24813
+ isParcours?: undefined;
24814
+ issuer?: undefined;
24815
+ award?: undefined;
24816
+ badgeId?: undefined;
24817
+ evidences?: undefined;
24818
+ narative?: undefined;
24819
+ endDateUTC?: undefined;
24820
+ startDateUTC?: undefined;
24821
+ category?: undefined;
24822
+ links?: undefined;
24823
+ section?: undefined;
24824
+ subType?: undefined;
24825
+ parent_only?: undefined;
24826
+ types?: undefined;
24827
+ date?: undefined;
24828
+ fromToday?: undefined;
24829
+ regions?: undefined;
24830
+ timezone?: undefined;
24831
+ event?: undefined;
24832
+ tl?: undefined;
24833
+ contentKey?: undefined;
24834
+ folderId?: undefined;
24835
+ mapUsed?: undefined;
24836
+ options?: undefined;
24837
+ sortBy?: undefined;
24838
+ answerId?: undefined;
24839
+ finderPath?: undefined;
24840
+ formId?: undefined;
24841
+ elementId?: undefined;
24842
+ elementType?: undefined;
24843
+ parentFormId?: undefined;
24844
+ docType?: undefined;
24845
+ subKey?: undefined;
24846
+ inputKeys?: undefined;
24847
+ addedOptions?: undefined;
24848
+ answers?: undefined;
24849
+ stepKey?: undefined;
24850
+ criteriaIds?: undefined;
24851
+ inputKey?: undefined;
24852
+ details?: undefined;
24853
+ edit?: undefined;
24854
+ formParentId?: undefined;
24855
+ setType?: undefined;
24856
+ updatePartial?: undefined;
24857
+ connect?: undefined;
24858
+ isAdmin?: undefined;
24859
+ searchedData?: undefined;
24860
+ level?: undefined;
24861
+ upperLevelId?: undefined;
24862
+ forms?: undefined;
24863
+ answer?: undefined;
24864
+ financerId?: undefined;
24865
+ financerType?: undefined;
24866
+ project?: undefined;
24867
+ form?: undefined;
24868
+ assign?: undefined;
24869
+ credits?: undefined;
24870
+ idParentRoom?: undefined;
24871
+ importance?: undefined;
24872
+ is_contributor?: undefined;
24873
+ max?: undefined;
24874
+ milestone?: undefined;
24875
+ min?: undefined;
24876
+ status?: undefined;
24877
+ timeSpent?: undefined;
24878
+ user?: undefined;
24879
+ contributor?: undefined;
24880
+ contributors?: undefined;
24881
+ participate?: undefined;
24882
+ limit?: undefined;
24883
+ subtype?: undefined;
24884
+ validationKey?: undefined;
24885
+ };
24886
+ type: string;
24887
+ required?: undefined;
24888
+ allOf?: undefined;
24889
+ $defs?: undefined;
24890
+ else?: undefined;
24891
+ if?: undefined;
24892
+ then?: undefined;
24893
+ anyOf?: undefined;
24894
+ startBeforeEnd?: undefined;
24895
+ };
24896
+ generateModule?: undefined;
24897
+ onlyAuthNone?: undefined;
24898
+ postActions?: undefined;
24899
+ params?: undefined;
24627
24900
  } | {
24628
24901
  auth: string;
24629
24902
  constant: string;
@@ -25505,8 +25778,8 @@ declare const endpoints: {
25505
25778
  subtype?: undefined;
25506
25779
  validationKey?: undefined;
25507
25780
  };
25781
+ required: string[];
25508
25782
  type: string;
25509
- required?: undefined;
25510
25783
  allOf?: undefined;
25511
25784
  $defs?: undefined;
25512
25785
  else?: undefined;