@selfcommunity/api-services 0.4.50-alpha.0 → 0.4.50-event.30

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.
@@ -1196,6 +1196,113 @@ const Endpoints = {
1196
1196
  GetUserSubscribedGroups: {
1197
1197
  url: (0, utils_1.urlReplacer)('/api/v2/user/$(id)/groups/'),
1198
1198
  method: 'GET'
1199
+ },
1200
+ /**
1201
+ * Events
1202
+ */
1203
+ GetUserEvents: {
1204
+ url: (0, utils_1.urlReplacer)('/api/v2/event/'),
1205
+ method: 'GET'
1206
+ },
1207
+ GetEventInfo: {
1208
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/'),
1209
+ method: 'GET'
1210
+ },
1211
+ GetEventFeed: {
1212
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/feed/'),
1213
+ method: 'GET'
1214
+ },
1215
+ SearchEvents: {
1216
+ url: (0, utils_1.urlReplacer)('/api/v2/event/search/'),
1217
+ method: 'GET'
1218
+ },
1219
+ CreateEvent: {
1220
+ url: (0, utils_1.urlReplacer)('/api/v2/event/'),
1221
+ method: 'POST'
1222
+ },
1223
+ UpdateEvent: {
1224
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/'),
1225
+ method: 'PUT'
1226
+ },
1227
+ DeleteEvent: {
1228
+ url: (0, utils_1.urlReplacer)('/api/v2/event/'),
1229
+ method: 'DELETE'
1230
+ },
1231
+ PatchEvent: {
1232
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/'),
1233
+ method: 'PATCH'
1234
+ },
1235
+ GetEventSuggestedUsers: {
1236
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/user/?search=$(search)'),
1237
+ method: 'GET'
1238
+ },
1239
+ GetUsersGoingToEvent: {
1240
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/going/'),
1241
+ method: 'GET'
1242
+ },
1243
+ GetUsersNotGoingToEvent: {
1244
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/not_going/'),
1245
+ method: 'GET'
1246
+ },
1247
+ GoToEvent: {
1248
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/going/'),
1249
+ method: 'POST'
1250
+ },
1251
+ RemoveGoingToEvent: {
1252
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/going/'),
1253
+ method: 'DELETE'
1254
+ },
1255
+ NotGoingToEvent: {
1256
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/not_going/'),
1257
+ method: 'POST'
1258
+ },
1259
+ RemoveNotGoingToEvent: {
1260
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/not_going/'),
1261
+ method: 'DELETE'
1262
+ },
1263
+ GetEventsSuggestedUsers: {
1264
+ url: (0, utils_1.urlReplacer)('/api/v2/event/user/?search=$(search)'),
1265
+ method: 'GET'
1266
+ },
1267
+ InviteOrAcceptEventRequest: {
1268
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/invite/'),
1269
+ method: 'POST'
1270
+ },
1271
+ GetEventInvitedUsers: {
1272
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/invite/'),
1273
+ method: 'GET'
1274
+ },
1275
+ GetEventSubscriptionStatus: {
1276
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/status/'),
1277
+ method: 'GET'
1278
+ },
1279
+ SubscribeToEvent: {
1280
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/subscribe/'),
1281
+ method: 'POST'
1282
+ },
1283
+ GetEventSubscribers: {
1284
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/subscribe/'),
1285
+ method: 'GET'
1286
+ },
1287
+ GetEventWaitingApprovalSubscribers: {
1288
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/request_subscribe/'),
1289
+ method: 'GET'
1290
+ },
1291
+ UnsubscribeFromEvent: {
1292
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/subscribe/'),
1293
+ method: 'DELETE'
1294
+ },
1295
+ GetUserSubscribedEvents: {
1296
+ url: (0, utils_1.urlReplacer)('/api/v2/user/$(id)/events/'),
1297
+ method: 'GET'
1298
+ },
1299
+ HideEvent: {
1300
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/hide/'),
1301
+ method: 'POST'
1302
+ },
1303
+ ShowEvent: {
1304
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/show/'),
1305
+ method: 'POST'
1199
1306
  }
1200
1307
  };
1201
1308
  exports.default = Endpoints;
@@ -47,11 +47,12 @@ import UserService, { UserApiClient, UserApiClientInterface } from './services/u
47
47
  import WebhookService, { WebhookApiClient, WebhookApiClientInterface } from './services/webhook';
48
48
  import ReactionService, { ReactionApiClient, ReactionApiClientInterface } from './services/reactions';
49
49
  import GroupService, { GroupApiClient, GroupApiClientInterface } from './services/group';
50
+ import EventService, { EventApiClient, EventApiClientInterface } from './services/event';
50
51
  /**
51
52
  * Types
52
53
  */
53
- import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams } from './types';
54
+ import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventSearchParams } from './types';
54
55
  /**
55
56
  * Export all
56
57
  */
57
- export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountSearchParams, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface, GroupCreateParams, GroupFeedParams, GroupService, GroupApiClient, GroupApiClientInterface };
58
+ export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountSearchParams, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface, GroupCreateParams, GroupFeedParams, GroupService, GroupApiClient, GroupApiClientInterface, EventCreateParams, EventFeedParams, EventSearchParams, EventService, EventApiClient, EventApiClientInterface };
package/lib/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModerationService = exports.MediaApiClient = exports.MediaService = exports.LoyaltyApiClient = exports.LoyaltyService = exports.LocalityApiClient = exports.LocalityService = exports.LegalPageApiClient = exports.LegalPageService = exports.InviteApiClient = exports.InviteService = exports.InsightApiClient = exports.InsightService = exports.IncubatorApiClient = exports.IncubatorService = exports.FeedObjectApiClient = exports.FeedObjectService = exports.FeedApiClient = exports.FeedService = exports.EmbedApiClient = exports.EmbedService = exports.DataPortabilityApiClient = exports.DataPortabilityService = exports.CustomPageApiClient = exports.CustomPageService = exports.CustomMenuApiClient = exports.CustomMenuService = exports.CustomAdvApiClient = exports.CustomAdvService = exports.CommentApiClient = exports.CommentService = exports.CategoryApiClient = exports.CategoryService = exports.FeatureApiClient = exports.FeatureService = exports.UserApiClient = exports.UserService = exports.PreferenceApiClient = exports.PreferenceService = exports.AccountApiClient = exports.AccountService = exports.Endpoints = exports.urlParams = exports.parseJwt = exports.generateJWTToken = exports.getCancelTokenSourceRequest = exports.formatHttpErrorCode = exports.formatHttpError = exports.apiRequest = exports.http = void 0;
4
- exports.GroupApiClient = exports.GroupService = exports.ReactionApiClient = exports.ReactionService = exports.MediaTypes = exports.WebhookApiClient = exports.WebhookService = exports.TagApiClient = exports.TagService = exports.SuggestionApiClient = exports.SuggestionService = exports.SSOApiClient = exports.SSOService = exports.ScoreApiClient = exports.ScoreService = exports.PromoApiClient = exports.PromoService = exports.PrivateMessageApiClient = exports.PrivateMessageService = exports.NotificationApiClient = exports.NotificationService = exports.ModerationApiClient = void 0;
4
+ exports.EventApiClient = exports.EventService = exports.GroupApiClient = exports.GroupService = exports.ReactionApiClient = exports.ReactionService = exports.MediaTypes = exports.WebhookApiClient = exports.WebhookService = exports.TagApiClient = exports.TagService = exports.SuggestionApiClient = exports.SuggestionService = exports.SSOApiClient = exports.SSOService = exports.ScoreApiClient = exports.ScoreService = exports.PromoApiClient = exports.PromoService = exports.PrivateMessageApiClient = exports.PrivateMessageService = exports.NotificationApiClient = exports.NotificationService = exports.ModerationApiClient = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  /**
7
7
  * Axios client wrapper
@@ -123,6 +123,9 @@ Object.defineProperty(exports, "ReactionApiClient", { enumerable: true, get: fun
123
123
  const group_1 = tslib_1.__importStar(require("./services/group"));
124
124
  exports.GroupService = group_1.default;
125
125
  Object.defineProperty(exports, "GroupApiClient", { enumerable: true, get: function () { return group_1.GroupApiClient; } });
126
+ const event_1 = tslib_1.__importStar(require("./services/event"));
127
+ exports.EventService = event_1.default;
128
+ Object.defineProperty(exports, "EventApiClient", { enumerable: true, get: function () { return event_1.EventApiClient; } });
126
129
  /**
127
130
  * Types
128
131
  */
@@ -0,0 +1,257 @@
1
+ import { BaseGetParams, BaseSearchParams, EventFeedParams, SCPaginatedResponse } from '../../types';
2
+ import { SCEventType, SCUserType } from '@selfcommunity/types';
3
+ import { AxiosRequestConfig } from 'axios';
4
+ import { EventCreateParams, EventSearchParams } from '../../types';
5
+ export interface EventApiClientInterface {
6
+ getUserEvents(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
7
+ getUserSubscribedEvents(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
8
+ searchEvents(params?: EventSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
9
+ getSpecificEventInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCEventType>;
10
+ getEventFeed(id: number | string, params?: EventFeedParams, config?: AxiosRequestConfig): Promise<any>;
11
+ createEvent(data: EventCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
12
+ updateEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
13
+ patchEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
14
+ deleteEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
15
+ changeEventAvatarOrCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
16
+ getEventMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
17
+ getEventSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
18
+ getEventsSuggestedUsers(search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
19
+ getEventInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
20
+ getUsersGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
21
+ getUsersNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
22
+ subscribeToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
23
+ unsubscribeFromEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
24
+ inviteOrAcceptEventRequest(id: number | string, data: {
25
+ users: number[];
26
+ }, config?: AxiosRequestConfig): Promise<any>;
27
+ getEventSubscriptionStatus(id: number | string, config?: AxiosRequestConfig): Promise<any>;
28
+ goToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
29
+ removeGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
30
+ notGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
31
+ removeNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
32
+ }
33
+ /**
34
+ * Contains all the endpoints needed to manage events.
35
+ */
36
+ export declare class EventApiClient {
37
+ /**
38
+ * This endpoint retrieves all the events of the logged-in user.
39
+ * @param params
40
+ * @param config
41
+ */
42
+ static getUserEvents(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
43
+ /**
44
+ * This endpoint retrieves a specific user events.
45
+ * @param id
46
+ * @param params
47
+ * @param config
48
+ */
49
+ static getUserSubscribedEvents(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
50
+ /**
51
+ * This endpoint performs events search
52
+ * @param params
53
+ * @param config
54
+ */
55
+ static searchEvents(params?: EventSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
56
+ /**
57
+ * This endpoint retrieves a specific event.
58
+ * @param id
59
+ * @param config
60
+ */
61
+ static getSpecificEventInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCEventType>;
62
+ /**
63
+ * This endpoint performs events search
64
+ * @param id
65
+ * @param params
66
+ * @param config
67
+ */
68
+ static getEventFeed(id: number | string, params?: EventFeedParams, config?: AxiosRequestConfig): Promise<any>;
69
+ /**
70
+ * This endpoint creates an event.
71
+ * @param data
72
+ * @param config
73
+ */
74
+ static createEvent(data: EventCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
75
+ /**
76
+ * This endpoint updates an event.
77
+ * @param id
78
+ * @param data
79
+ * @param config
80
+ */
81
+ static updateEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
82
+ /**
83
+ * This endpoint patches an event.
84
+ * @param id
85
+ * @param data
86
+ * @param config
87
+ */
88
+ static patchEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
89
+ /**
90
+ * This endpoint deletes an event.
91
+ * @param id
92
+ * @param config
93
+ */
94
+ static deleteEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
95
+ /**
96
+ * This endpoint changes the event avatar
97
+ * @param id
98
+ * @param data
99
+ * @param config
100
+ */
101
+ static changeEventAvatarOrCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
102
+ /**
103
+ * This endpoint returns all subscribers of a specific event.
104
+ * @param id
105
+ * @param params
106
+ * @param config
107
+ */
108
+ static getEventMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
109
+ /**
110
+ * This endpoint returns a list of suggested users to invite to the event.
111
+ * @param id
112
+ * @param search
113
+ * @param config
114
+ */
115
+ static getEventSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
116
+ /**
117
+ * This endpoint returns a list of suggested users to invite to the events.
118
+ * @param search
119
+ * @param config
120
+ */
121
+ static getEventsSuggestedUsers(search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
122
+ /**
123
+ * This endpoint returns a list of invited users.
124
+ * @param id
125
+ * @param params
126
+ * @param config
127
+ */
128
+ static getEventInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
129
+ /**
130
+ * This endpoint returns a list of users attending the event.
131
+ * @param id
132
+ * @param params
133
+ * @param config
134
+ */
135
+ static getUsersGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
136
+ /**
137
+ * This endpoint returns a list of users not attending the event.
138
+ * @param id
139
+ * @param params
140
+ * @param config
141
+ */
142
+ static getUsersNotGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
143
+ /**
144
+ * This endpoint subscribes to an event.
145
+ * @param id
146
+ * @param config
147
+ */
148
+ static subscribeToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
149
+ /**
150
+ * This endpoint unsubscribes from an event.
151
+ * @param id
152
+ * @param config
153
+ */
154
+ static unsubscribeFromEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
155
+ /**
156
+ * This endpoint allows to invite or accept an event invite.
157
+ * @param id
158
+ * @param data
159
+ * @param config
160
+ */
161
+ static inviteOrAcceptEventRequest(id: number | string, data: {
162
+ users: number[];
163
+ }, config?: AxiosRequestConfig): Promise<any>;
164
+ /**
165
+ * This endpoint retrieves the event subscription status.
166
+ * @param id
167
+ * @param config
168
+ */
169
+ static getEventSubscriptionStatus(id: number | string, config?: AxiosRequestConfig): Promise<any>;
170
+ /**
171
+ * This endpoint allows to attend an event
172
+ * @param id
173
+ * @param config
174
+ */
175
+ static goToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
176
+ /**
177
+ * This endpoint allows to remove an event participation
178
+ * @param id
179
+ * @param config
180
+ */
181
+ static removeGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
182
+ /**
183
+ * This endpoint allows to not attend an event
184
+ * @param id
185
+ * @param config
186
+ */
187
+ static notGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
188
+ /**
189
+ * This endpoint allows to remove the event not attending
190
+ * @param id
191
+ * @param config
192
+ */
193
+ static removeNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
194
+ }
195
+ /**
196
+ *
197
+ :::tip Incubator service can be used in the following way:
198
+
199
+ ```jsx
200
+ 1. Import the service from our library:
201
+
202
+ import {EventService} from "@selfcommunity/api-services";
203
+ ```
204
+ ```jsx
205
+ 2. Create a function and put the service inside it!
206
+ The async function `searchEvents` will return the events matching the search query.
207
+
208
+ async searchEvents() {
209
+ return await EventService.searchEvents();
210
+ }
211
+ ```
212
+ ```jsx
213
+ In case of required `params`, just add them inside the brackets.
214
+
215
+ async getSpecificEventInfo(eventId) {
216
+ return await EventService.getSpecificEventInfo(eventId);
217
+ }
218
+ ```
219
+ ```jsx
220
+ If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
221
+
222
+ 1. Declare it(or declare them, it is possible to add multiple params)
223
+
224
+ const headers = headers: {Authorization: `Bearer ${yourToken}`}
225
+
226
+ 2. Add it inside the brackets and pass it to the function, as shown in the previous example!
227
+ ```
228
+ :::
229
+ */
230
+ export default class EventService {
231
+ static getUserEvents(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
232
+ static getUserSubscribedEvents(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
233
+ static searchEvents(params?: EventSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
234
+ static getSpecificEventInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCEventType>;
235
+ static getEventFeed(id: number | string, params?: EventFeedParams, config?: AxiosRequestConfig): Promise<any>;
236
+ static createEvent(data: EventCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
237
+ static updateEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
238
+ static patchEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
239
+ static deleteEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
240
+ static changeEventAvatarOrCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
241
+ static getEventMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
242
+ static getEventSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
243
+ static getEventsSuggestedUsers(search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
244
+ static getEventInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
245
+ static getUsersGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
246
+ static getUsersNotGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
247
+ static subscribeToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
248
+ static unsubscribeFromEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
249
+ static inviteOrAcceptEventRequest(id: number | string, data: {
250
+ users: number[];
251
+ }, config?: AxiosRequestConfig): Promise<any>;
252
+ static getEventSubscriptionStatus(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
253
+ static goToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
254
+ static removeGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
255
+ static notGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
256
+ static removeNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
257
+ }