@selfcommunity/api-services 0.4.55 → 0.5.0-alpha.0

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.
Files changed (36) hide show
  1. package/lib/cjs/constants/Endpoints.js +146 -0
  2. package/lib/cjs/index.d.ts +4 -2
  3. package/lib/cjs/index.js +8 -1
  4. package/lib/cjs/services/event/index.d.ts +316 -0
  5. package/lib/cjs/services/event/index.js +467 -0
  6. package/lib/cjs/services/onboarding/index.d.ts +80 -0
  7. package/lib/cjs/services/onboarding/index.js +102 -0
  8. package/lib/cjs/services/preference/index.d.ts +8 -0
  9. package/lib/cjs/services/preference/index.js +13 -0
  10. package/lib/cjs/services/suggestion/index.d.ts +9 -1
  11. package/lib/cjs/services/suggestion/index.js +13 -0
  12. package/lib/cjs/types/event.d.ts +108 -0
  13. package/lib/cjs/types/event.js +2 -0
  14. package/lib/cjs/types/index.d.ts +3 -1
  15. package/lib/cjs/types/index.js +3 -1
  16. package/lib/cjs/types/onBoarding.d.ts +30 -0
  17. package/lib/cjs/types/onBoarding.js +18 -0
  18. package/lib/esm/constants/Endpoints.js +146 -0
  19. package/lib/esm/index.d.ts +4 -2
  20. package/lib/esm/index.js +4 -2
  21. package/lib/esm/services/event/index.d.ts +316 -0
  22. package/lib/esm/services/event/index.js +462 -0
  23. package/lib/esm/services/onboarding/index.d.ts +80 -0
  24. package/lib/esm/services/onboarding/index.js +97 -0
  25. package/lib/esm/services/preference/index.d.ts +8 -0
  26. package/lib/esm/services/preference/index.js +13 -0
  27. package/lib/esm/services/suggestion/index.d.ts +9 -1
  28. package/lib/esm/services/suggestion/index.js +13 -0
  29. package/lib/esm/types/event.d.ts +108 -0
  30. package/lib/esm/types/event.js +1 -0
  31. package/lib/esm/types/index.d.ts +3 -1
  32. package/lib/esm/types/index.js +2 -1
  33. package/lib/esm/types/onBoarding.d.ts +30 -0
  34. package/lib/esm/types/onBoarding.js +15 -0
  35. package/lib/umd/api-services.js +1 -1
  36. package/package.json +4 -4
@@ -61,6 +61,10 @@ const Endpoints = {
61
61
  url: (0, utils_1.urlReplacer)('/api/v2/dynamic_preference/$(id)/'),
62
62
  method: 'GET'
63
63
  },
64
+ UpdatePreferences: {
65
+ url: (0, utils_1.urlReplacer)('/api/v2/dynamic_preference/'),
66
+ method: 'PATCH'
67
+ },
64
68
  /**
65
69
  * SSO Endpoints
66
70
  */
@@ -586,6 +590,10 @@ const Endpoints = {
586
590
  url: (0, utils_1.urlReplacer)('/api/v2/suggestion/user/'),
587
591
  method: 'GET'
588
592
  },
593
+ EventSuggestion: {
594
+ url: (0, utils_1.urlReplacer)('/api/v2/suggestion/event/'),
595
+ method: 'GET'
596
+ },
589
597
  SearchSuggestion: {
590
598
  url: (0, utils_1.urlReplacer)('/api/v2/suggestion/'),
591
599
  method: 'GET'
@@ -1196,6 +1204,144 @@ const Endpoints = {
1196
1204
  GetUserSubscribedGroups: {
1197
1205
  url: (0, utils_1.urlReplacer)('/api/v2/user/$(id)/groups/'),
1198
1206
  method: 'GET'
1207
+ },
1208
+ /**
1209
+ * Events
1210
+ */
1211
+ GetUserEvents: {
1212
+ url: (0, utils_1.urlReplacer)('/api/v2/event/'),
1213
+ method: 'GET'
1214
+ },
1215
+ GetEventInfo: {
1216
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/'),
1217
+ method: 'GET'
1218
+ },
1219
+ GetEventFeed: {
1220
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/feed/'),
1221
+ method: 'GET'
1222
+ },
1223
+ SearchEvents: {
1224
+ url: (0, utils_1.urlReplacer)('/api/v2/event/search/'),
1225
+ method: 'GET'
1226
+ },
1227
+ CreateEvent: {
1228
+ url: (0, utils_1.urlReplacer)('/api/v2/event/'),
1229
+ method: 'POST'
1230
+ },
1231
+ UpdateEvent: {
1232
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/'),
1233
+ method: 'PUT'
1234
+ },
1235
+ DeleteEvent: {
1236
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/'),
1237
+ method: 'DELETE'
1238
+ },
1239
+ PatchEvent: {
1240
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/'),
1241
+ method: 'PATCH'
1242
+ },
1243
+ GetEventSuggestedUsers: {
1244
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/user/?search=$(search)'),
1245
+ method: 'GET'
1246
+ },
1247
+ GetUsersGoingToEvent: {
1248
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/going/'),
1249
+ method: 'GET'
1250
+ },
1251
+ GetUsersNotGoingToEvent: {
1252
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/not_going/'),
1253
+ method: 'GET'
1254
+ },
1255
+ GoToEvent: {
1256
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/going/'),
1257
+ method: 'POST'
1258
+ },
1259
+ RemoveGoingToEvent: {
1260
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/going/'),
1261
+ method: 'DELETE'
1262
+ },
1263
+ NotGoingToEvent: {
1264
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/not_going/'),
1265
+ method: 'POST'
1266
+ },
1267
+ RemoveNotGoingToEvent: {
1268
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/not_going/'),
1269
+ method: 'DELETE'
1270
+ },
1271
+ GetEventsSuggestedUsers: {
1272
+ url: (0, utils_1.urlReplacer)('/api/v2/event/user/?search=$(search)'),
1273
+ method: 'GET'
1274
+ },
1275
+ InviteOrAcceptEventRequest: {
1276
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/invite/'),
1277
+ method: 'POST'
1278
+ },
1279
+ RemoveInviteEvent: {
1280
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/invite/'),
1281
+ method: 'DELETE'
1282
+ },
1283
+ GetEventInvitedUsers: {
1284
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/invite/'),
1285
+ method: 'GET'
1286
+ },
1287
+ GetEventSubscriptionStatus: {
1288
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/status/'),
1289
+ method: 'GET'
1290
+ },
1291
+ SubscribeToEvent: {
1292
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/subscribe/'),
1293
+ method: 'POST'
1294
+ },
1295
+ GetEventSubscribers: {
1296
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/subscribe/'),
1297
+ method: 'GET'
1298
+ },
1299
+ GetEventWaitingApprovalSubscribers: {
1300
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/request_subscribe/'),
1301
+ method: 'GET'
1302
+ },
1303
+ UnsubscribeFromEvent: {
1304
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/subscribe/'),
1305
+ method: 'DELETE'
1306
+ },
1307
+ GetUserSubscribedEvents: {
1308
+ url: (0, utils_1.urlReplacer)('/api/v2/user/$(id)/events/'),
1309
+ method: 'GET'
1310
+ },
1311
+ GetEventRelated: {
1312
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/related/'),
1313
+ method: 'GET'
1314
+ },
1315
+ GetUserCreatedEvents: {
1316
+ url: (0, utils_1.urlReplacer)('/api/v2/event/created/'),
1317
+ method: 'GET'
1318
+ },
1319
+ ShowEvent: {
1320
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/show/'),
1321
+ method: 'POST'
1322
+ },
1323
+ HideEvent: {
1324
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/hide/'),
1325
+ method: 'POST'
1326
+ },
1327
+ /**
1328
+ * OnBoarding
1329
+ */
1330
+ GetAllSteps: {
1331
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/'),
1332
+ method: 'GET'
1333
+ },
1334
+ GetAStep: {
1335
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/$(step)/'),
1336
+ method: 'GET'
1337
+ },
1338
+ StartAStep: {
1339
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/$(step)/start/'),
1340
+ method: 'POST'
1341
+ },
1342
+ CompleteAStep: {
1343
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/$(step)/complete/'),
1344
+ method: 'POST'
1199
1345
  }
1200
1346
  };
1201
1347
  exports.default = Endpoints;
@@ -47,11 +47,13 @@ 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';
51
+ import OnBoardingService, { OnBoardingApiClient, OnBoardingApiClientInterface } from './services/onboarding';
50
52
  /**
51
53
  * Types
52
54
  */
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';
55
+ 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, StartStepParams, OnBoardingStep } from './types';
54
56
  /**
55
57
  * Export all
56
58
  */
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 };
59
+ 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, OnBoardingService, OnBoardingApiClientInterface, OnBoardingApiClient, StartStepParams, OnBoardingStep };
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.OnBoardingStep = exports.OnBoardingApiClient = exports.OnBoardingService = 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,8 +123,15 @@ 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; } });
129
+ const onboarding_1 = tslib_1.__importStar(require("./services/onboarding"));
130
+ exports.OnBoardingService = onboarding_1.default;
131
+ Object.defineProperty(exports, "OnBoardingApiClient", { enumerable: true, get: function () { return onboarding_1.OnBoardingApiClient; } });
126
132
  /**
127
133
  * Types
128
134
  */
129
135
  const types_1 = require("./types");
130
136
  Object.defineProperty(exports, "MediaTypes", { enumerable: true, get: function () { return types_1.MediaTypes; } });
137
+ Object.defineProperty(exports, "OnBoardingStep", { enumerable: true, get: function () { return types_1.OnBoardingStep; } });
@@ -0,0 +1,316 @@
1
+ import { BaseGetParams, BaseSearchParams, EventFeedParams, EventRelatedParams, SCPaginatedResponse } from '../../types';
2
+ import { SCEventType, SCUserType } from '@selfcommunity/types';
3
+ import { AxiosRequestConfig } from 'axios';
4
+ import { EventCreateParams, EventSearchParams } from '../../types';
5
+ import { EventUserParams } from '../../types/event';
6
+ export interface EventApiClientInterface {
7
+ getUserEvents(params?: EventUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
8
+ getUserSubscribedEvents(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
9
+ getUserCreatedEvents(params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
10
+ searchEvents(params?: EventSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
11
+ getSpecificEventInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCEventType>;
12
+ getEventFeed(id: number | string, params?: EventFeedParams, config?: AxiosRequestConfig): Promise<any>;
13
+ createEvent(data: EventCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
14
+ updateEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
15
+ patchEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
16
+ deleteEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
17
+ changeEventCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
18
+ getEventMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
19
+ getEventWaitingApprovalSubscribers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
20
+ getEventSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
21
+ getEventsSuggestedUsers(search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
22
+ getEventInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
23
+ getUsersGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
24
+ getUsersNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
25
+ subscribeToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
26
+ unsubscribeFromEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
27
+ inviteOrAcceptEventRequest(id: number | string, data: {
28
+ users: number[];
29
+ }, config?: AxiosRequestConfig): Promise<any>;
30
+ removeInviteEvent(id: number | string, data: {
31
+ users: number[];
32
+ }, config?: AxiosRequestConfig): Promise<any>;
33
+ getEventSubscriptionStatus(id: number | string, config?: AxiosRequestConfig): Promise<any>;
34
+ goToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
35
+ removeGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
36
+ notGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
37
+ removeNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
38
+ getEventRelated(id: number | string, params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<any>;
39
+ showEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
40
+ hideEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
41
+ }
42
+ /**
43
+ * Contains all the endpoints needed to manage events.
44
+ */
45
+ export declare class EventApiClient {
46
+ /**
47
+ * This endpoint retrieves all the events of the logged-in user.
48
+ * @param params
49
+ * @param config
50
+ */
51
+ static getUserEvents(params?: EventUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
52
+ /**
53
+ * This endpoint retrieves a specific user events.
54
+ * @param id
55
+ * @param params
56
+ * @param config
57
+ */
58
+ static getUserSubscribedEvents(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
59
+ /**
60
+ * This endpoint returns all events cretaed by a specific event.
61
+ * @param id
62
+ * @param params
63
+ * @param config
64
+ */
65
+ static getUserCreatedEvents(params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
66
+ /**
67
+ * This endpoint performs events search
68
+ * @param params
69
+ * @param config
70
+ */
71
+ static searchEvents(params?: EventSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
72
+ /**
73
+ * This endpoint retrieves a specific event.
74
+ * @param id
75
+ * @param config
76
+ */
77
+ static getSpecificEventInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCEventType>;
78
+ /**
79
+ * This endpoint performs events search
80
+ * @param id
81
+ * @param params
82
+ * @param config
83
+ */
84
+ static getEventFeed(id: number | string, params?: EventFeedParams, config?: AxiosRequestConfig): Promise<any>;
85
+ /**
86
+ * This endpoint creates an event.
87
+ * @param data
88
+ * @param config
89
+ */
90
+ static createEvent(data: EventCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
91
+ /**
92
+ * This endpoint updates an event.
93
+ * @param id
94
+ * @param data
95
+ * @param config
96
+ */
97
+ static updateEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
98
+ /**
99
+ * This endpoint patches an event.
100
+ * @param id
101
+ * @param data
102
+ * @param config
103
+ */
104
+ static patchEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
105
+ /**
106
+ * This endpoint deletes an event.
107
+ * @param id
108
+ * @param config
109
+ */
110
+ static deleteEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
111
+ /**
112
+ * This endpoint changes the event avatar
113
+ * @param id
114
+ * @param data
115
+ * @param config
116
+ */
117
+ static changeEventCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
118
+ /**
119
+ * This endpoint returns all subscribers of a specific event.
120
+ * @param id
121
+ * @param params
122
+ * @param config
123
+ */
124
+ static getEventMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
125
+ /**
126
+ * This endpoint returns all waiting approval subscribers
127
+ * @param id
128
+ * @param params
129
+ * @param config
130
+ */
131
+ static getEventWaitingApprovalSubscribers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
132
+ /**
133
+ * This endpoint returns a list of suggested users to invite to the event.
134
+ * @param id
135
+ * @param search
136
+ * @param config
137
+ */
138
+ static getEventSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
139
+ /**
140
+ * This endpoint returns a list of suggested users to invite to the events.
141
+ * @param search
142
+ * @param config
143
+ */
144
+ static getEventsSuggestedUsers(search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
145
+ /**
146
+ * This endpoint returns a list of invited users.
147
+ * @param id
148
+ * @param params
149
+ * @param config
150
+ */
151
+ static getEventInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
152
+ /**
153
+ * This endpoint returns a list of users attending the event.
154
+ * @param id
155
+ * @param params
156
+ * @param config
157
+ */
158
+ static getUsersGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
159
+ /**
160
+ * This endpoint returns a list of users not attending the event.
161
+ * @param id
162
+ * @param params
163
+ * @param config
164
+ */
165
+ static getUsersNotGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
166
+ /**
167
+ * This endpoint subscribes to an event.
168
+ * @param id
169
+ * @param config
170
+ */
171
+ static subscribeToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
172
+ /**
173
+ * This endpoint unsubscribes from an event.
174
+ * @param id
175
+ * @param config
176
+ */
177
+ static unsubscribeFromEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
178
+ /**
179
+ * This endpoint allows to invite or accept an event invite.
180
+ * @param id
181
+ * @param data
182
+ * @param config
183
+ */
184
+ static inviteOrAcceptEventRequest(id: number | string, data: {
185
+ users: number[];
186
+ }, config?: AxiosRequestConfig): Promise<any>;
187
+ /**
188
+ * This endpoint allows to remove invites.
189
+ * @param id
190
+ * @param data
191
+ * @param config
192
+ */
193
+ static removeInviteEvent(id: number | string, data: {
194
+ users: number[];
195
+ }, config?: AxiosRequestConfig): Promise<any>;
196
+ /**
197
+ * This endpoint retrieves the event subscription status.
198
+ * @param id
199
+ * @param config
200
+ */
201
+ static getEventSubscriptionStatus(id: number | string, config?: AxiosRequestConfig): Promise<any>;
202
+ /**
203
+ * This endpoint allows to attend an event
204
+ * @param id
205
+ * @param config
206
+ */
207
+ static goToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
208
+ /**
209
+ * This endpoint allows to remove an event participation
210
+ * @param id
211
+ * @param config
212
+ */
213
+ static removeGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
214
+ /**
215
+ * This endpoint allows to not attend an event
216
+ * @param id
217
+ * @param config
218
+ */
219
+ static notGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
220
+ /**
221
+ * This endpoint allows to remove the event not attending
222
+ * @param id
223
+ * @param config
224
+ */
225
+ static removeNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
226
+ /**
227
+ * This endpoint returns all events related of a specific event.
228
+ * @param id
229
+ * @param params
230
+ * @param config
231
+ */
232
+ static getEventRelated(id: number | string, params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
233
+ /**
234
+ * This endpoint show a specific event.
235
+ * @param id
236
+ * @param config
237
+ */
238
+ static showEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
239
+ /**
240
+ * This endpoint hide a specific event.
241
+ * @param id
242
+ * @param config
243
+ */
244
+ static hideEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
245
+ }
246
+ /**
247
+ *
248
+ :::tip Incubator service can be used in the following way:
249
+
250
+ ```jsx
251
+ 1. Import the service from our library:
252
+
253
+ import {EventService} from "@selfcommunity/api-services";
254
+ ```
255
+ ```jsx
256
+ 2. Create a function and put the service inside it!
257
+ The async function `searchEvents` will return the events matching the search query.
258
+
259
+ async searchEvents() {
260
+ return await EventService.searchEvents();
261
+ }
262
+ ```
263
+ ```jsx
264
+ In case of required `params`, just add them inside the brackets.
265
+
266
+ async getSpecificEventInfo(eventId) {
267
+ return await EventService.getSpecificEventInfo(eventId);
268
+ }
269
+ ```
270
+ ```jsx
271
+ If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
272
+
273
+ 1. Declare it(or declare them, it is possible to add multiple params)
274
+
275
+ const headers = headers: {Authorization: `Bearer ${yourToken}`}
276
+
277
+ 2. Add it inside the brackets and pass it to the function, as shown in the previous example!
278
+ ```
279
+ :::
280
+ */
281
+ export default class EventService {
282
+ static getUserEvents(params?: EventUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
283
+ static getUserSubscribedEvents(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
284
+ static getUserCretaedEvents(params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
285
+ static searchEvents(params?: EventSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
286
+ static getSpecificEventInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCEventType>;
287
+ static getEventFeed(id: number | string, params?: EventFeedParams, config?: AxiosRequestConfig): Promise<any>;
288
+ static createEvent(data: EventCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
289
+ static updateEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
290
+ static patchEvent(id: number | string, data: SCEventType, config?: AxiosRequestConfig): Promise<SCEventType>;
291
+ static deleteEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
292
+ static changeEventCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCEventType>;
293
+ static getEventMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
294
+ static getEventWaitingApprovalSubscribers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
295
+ static getEventSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
296
+ static getEventsSuggestedUsers(search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
297
+ static getEventInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
298
+ static getUsersGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
299
+ static getUsersNotGoingToEvent(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
300
+ static subscribeToEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
301
+ static unsubscribeFromEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
302
+ static inviteOrAcceptEventRequest(id: number | string, data: {
303
+ users: number[];
304
+ }, config?: AxiosRequestConfig): Promise<any>;
305
+ static removeInviteEvent(id: number | string, data: {
306
+ users: number[];
307
+ }, config?: AxiosRequestConfig): Promise<any>;
308
+ static getEventSubscriptionStatus(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
309
+ static goToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
310
+ static removeGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
311
+ static notGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
312
+ static removeNotGoingToEvent(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
313
+ static getEventRelated(id: number | string, params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
314
+ static showEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
315
+ static hideEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
316
+ }