@selfcommunity/api-services 0.5.0-embeds.29 → 0.5.0-live.102

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 (37) hide show
  1. package/lib/cjs/client/index.d.ts +3 -3
  2. package/lib/cjs/client/index.js +3 -3
  3. package/lib/cjs/constants/Endpoints.js +63 -0
  4. package/lib/cjs/index.d.ts +3 -2
  5. package/lib/cjs/index.js +4 -1
  6. package/lib/cjs/services/event/index.d.ts +27 -3
  7. package/lib/cjs/services/event/index.js +42 -1
  8. package/lib/cjs/services/group/index.d.ts +8 -0
  9. package/lib/cjs/services/group/index.js +13 -0
  10. package/lib/cjs/services/live_stream/index.d.ts +139 -0
  11. package/lib/cjs/services/live_stream/index.js +198 -0
  12. package/lib/cjs/services/user/index.d.ts +10 -1
  13. package/lib/cjs/services/user/index.js +14 -0
  14. package/lib/cjs/types/event.d.ts +8 -0
  15. package/lib/cjs/types/index.d.ts +2 -1
  16. package/lib/cjs/types/liveStream.d.ts +50 -0
  17. package/lib/cjs/types/liveStream.js +2 -0
  18. package/lib/esm/client/index.d.ts +3 -3
  19. package/lib/esm/client/index.js +3 -3
  20. package/lib/esm/constants/Endpoints.js +63 -0
  21. package/lib/esm/index.d.ts +3 -2
  22. package/lib/esm/index.js +2 -1
  23. package/lib/esm/services/event/index.d.ts +27 -3
  24. package/lib/esm/services/event/index.js +42 -1
  25. package/lib/esm/services/group/index.d.ts +8 -0
  26. package/lib/esm/services/group/index.js +13 -0
  27. package/lib/esm/services/live_stream/index.d.ts +139 -0
  28. package/lib/esm/services/live_stream/index.js +193 -0
  29. package/lib/esm/services/user/index.d.ts +10 -1
  30. package/lib/esm/services/user/index.js +14 -0
  31. package/lib/esm/types/event.d.ts +8 -0
  32. package/lib/esm/types/index.d.ts +2 -1
  33. package/lib/esm/types/liveStream.d.ts +50 -0
  34. package/lib/esm/types/liveStream.js +1 -0
  35. package/lib/umd/api-services.js +1 -1
  36. package/lib/umd/api-services.js.LICENSE.txt +2 -0
  37. package/package.json +117 -112
@@ -2,17 +2,17 @@ import { AxiosInstance, AxiosResponse } from 'axios';
2
2
  /**
3
3
  * List of all Http methods
4
4
  */
5
- export declare type HttpMethod = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
5
+ export type HttpMethod = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
6
6
  /**
7
7
  * AxiosResponseHeaders interface
8
8
  */
9
- export declare type AxiosResponseHeaders = Record<string, string> & {
9
+ export type AxiosResponseHeaders = Record<string, string> & {
10
10
  'set-cookie'?: string[];
11
11
  };
12
12
  /**
13
13
  * General HttpResponse
14
14
  */
15
- export declare type HttpResponse<T = unknown, D = any> = AxiosResponse<T, D>;
15
+ export type HttpResponse<T = unknown, D = any> = AxiosResponse<T, D>;
16
16
  /**
17
17
  * Interface for the ApiClient
18
18
  */
@@ -10,6 +10,9 @@ const axios_1 = tslib_1.__importDefault(require("axios"));
10
10
  * should we choose to do so in the future, without it breaking our app.
11
11
  */
12
12
  class ApiClient {
13
+ createClient(config) {
14
+ return axios_1.default.create(Object.assign(Object.assign({}, (config && config.baseURL && { baseURL: config.baseURL })), { responseType: 'json', headers: Object.assign({}, (config && config.accessToken && { Authorization: `Token ${config.accessToken}` })), timeout: ApiClient.DEFAULT_TIMEOUT }));
15
+ }
13
16
  constructor(config) {
14
17
  /**
15
18
  * Set default header
@@ -51,9 +54,6 @@ class ApiClient {
51
54
  this.client = this.createClient(config);
52
55
  this.setDefaultHeader({ name: 'Content-Type', value: 'application/json', methods: ['post'] });
53
56
  }
54
- createClient(config) {
55
- return axios_1.default.create(Object.assign(Object.assign({}, (config && config.baseURL && { baseURL: config.baseURL })), { responseType: 'json', headers: Object.assign({}, (config && config.accessToken && { Authorization: `Token ${config.accessToken}` })), timeout: ApiClient.DEFAULT_TIMEOUT }));
56
- }
57
57
  /**
58
58
  * Get client instance
59
59
  */
@@ -517,6 +517,10 @@ const Endpoints = {
517
517
  url: (0, utils_1.urlReplacer)('/api/v2/user/$(id)/provider/'),
518
518
  method: 'DELETE'
519
519
  },
520
+ GetLiveStream: {
521
+ url: (0, utils_1.urlReplacer)('/api/v2/user/$(id)/live_stream/'),
522
+ method: 'GET'
523
+ },
520
524
  /**
521
525
  * Broadcast Messages
522
526
  */
@@ -1161,6 +1165,10 @@ const Endpoints = {
1161
1165
  url: (0, utils_1.urlReplacer)('/api/v2/group/$(id)/'),
1162
1166
  method: 'PATCH'
1163
1167
  },
1168
+ DeleteGroup: {
1169
+ url: (0, utils_1.urlReplacer)('/api/v2/group/$(id)/'),
1170
+ method: 'DELETE'
1171
+ },
1164
1172
  GetGroupSuggestedUsers: {
1165
1173
  url: (0, utils_1.urlReplacer)('/api/v2/group/$(id)/user/?search=$(search)'),
1166
1174
  method: 'GET'
@@ -1324,6 +1332,61 @@ const Endpoints = {
1324
1332
  url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/hide/'),
1325
1333
  method: 'POST'
1326
1334
  },
1335
+ GetEventPhotoGallery: {
1336
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/gallery/'),
1337
+ method: 'GET'
1338
+ },
1339
+ AddMediaToEventPhotoGallery: {
1340
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/gallery/'),
1341
+ method: 'POST'
1342
+ },
1343
+ RemoveMediasFromEventPhotoGallery: {
1344
+ url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/gallery/'),
1345
+ method: 'DELETE'
1346
+ },
1347
+ /**
1348
+ * LiveStream
1349
+ */
1350
+ GetLiveStreamInfo: {
1351
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/$(id)/'),
1352
+ method: 'GET'
1353
+ },
1354
+ SearchLiveStream: {
1355
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/search/'),
1356
+ method: 'GET'
1357
+ },
1358
+ CreateLiveStream: {
1359
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/'),
1360
+ method: 'POST'
1361
+ },
1362
+ UpdateLiveStream: {
1363
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/$(id)/'),
1364
+ method: 'PUT'
1365
+ },
1366
+ DeleteLiveStream: {
1367
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/$(id)/'),
1368
+ method: 'DELETE'
1369
+ },
1370
+ PatchLiveStream: {
1371
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/$(id)/'),
1372
+ method: 'PATCH'
1373
+ },
1374
+ CloseLiveStream: {
1375
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/$(id)/close/'),
1376
+ method: 'POST'
1377
+ },
1378
+ JoinLiveStream: {
1379
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/$(id)/join/'),
1380
+ method: 'POST'
1381
+ },
1382
+ RemoveParticipant: {
1383
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/$(id)/remove_participant/'),
1384
+ method: 'POST'
1385
+ },
1386
+ GetLiveStreamMonthlyDuration: {
1387
+ url: (0, utils_1.urlReplacer)('/api/v2/live_stream/monthly_duration/'),
1388
+ method: 'GET'
1389
+ },
1327
1390
  /**
1328
1391
  * OnBoarding
1329
1392
  */
@@ -48,12 +48,13 @@ import WebhookService, { WebhookApiClient, WebhookApiClientInterface } from './s
48
48
  import ReactionService, { ReactionApiClient, ReactionApiClientInterface } from './services/reactions';
49
49
  import GroupService, { GroupApiClient, GroupApiClientInterface } from './services/group';
50
50
  import EventService, { EventApiClient, EventApiClientInterface } from './services/event';
51
+ import LiveStreamService, { LiveStreamApiClient, LiveStreamApiClientInterface } from './services/live_stream';
51
52
  import OnBoardingService, { OnBoardingApiClient, OnBoardingApiClientInterface } from './services/onboarding';
52
53
  /**
53
54
  * Types
54
55
  */
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';
56
+ 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, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, StartStepParams, OnBoardingStep } from './types';
56
57
  /**
57
58
  * Export all
58
59
  */
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 };
60
+ 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, LiveStreamService, LiveStreamApiClient, LiveStreamApiClientInterface, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, 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.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;
4
+ exports.OnBoardingStep = exports.OnBoardingApiClient = exports.OnBoardingService = exports.LiveStreamApiClient = exports.LiveStreamService = 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
@@ -126,6 +126,9 @@ Object.defineProperty(exports, "GroupApiClient", { enumerable: true, get: functi
126
126
  const event_1 = tslib_1.__importStar(require("./services/event"));
127
127
  exports.EventService = event_1.default;
128
128
  Object.defineProperty(exports, "EventApiClient", { enumerable: true, get: function () { return event_1.EventApiClient; } });
129
+ const live_stream_1 = tslib_1.__importStar(require("./services/live_stream"));
130
+ exports.LiveStreamService = live_stream_1.default;
131
+ Object.defineProperty(exports, "LiveStreamApiClient", { enumerable: true, get: function () { return live_stream_1.LiveStreamApiClient; } });
129
132
  const onboarding_1 = tslib_1.__importStar(require("./services/onboarding"));
130
133
  exports.OnBoardingService = onboarding_1.default;
131
134
  Object.defineProperty(exports, "OnBoardingApiClient", { enumerable: true, get: function () { return onboarding_1.OnBoardingApiClient; } });
@@ -1,7 +1,6 @@
1
- import { BaseGetParams, BaseSearchParams, EventFeedParams, EventRelatedParams, SCPaginatedResponse } from '../../types';
2
- import { SCEventType, SCUserType } from '@selfcommunity/types';
1
+ import { SCEventType, SCMediaType, SCUserType } from '@selfcommunity/types';
3
2
  import { AxiosRequestConfig } from 'axios';
4
- import { EventCreateParams, EventSearchParams } from '../../types';
3
+ import { BaseGetParams, BaseSearchParams, EventCreateParams, EventFeedParams, EventRelatedParams, EventSearchParams, SCPaginatedResponse } from '../../types';
5
4
  import { EventUserParams } from '../../types/event';
6
5
  export interface EventApiClientInterface {
7
6
  getUserEvents(params?: EventUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
@@ -38,6 +37,9 @@ export interface EventApiClientInterface {
38
37
  getEventRelated(id: number | string, params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<any>;
39
38
  showEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
40
39
  hideEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
40
+ getEventPhotoGallery(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCMediaType>>;
41
+ addMediaToEventPhotoGallery(id: number | string, config?: AxiosRequestConfig): Promise<SCMediaType>;
42
+ removeMediasFromEventPhotoGallery(id: number | string, config?: AxiosRequestConfig): Promise<void>;
41
43
  }
42
44
  /**
43
45
  * Contains all the endpoints needed to manage events.
@@ -242,6 +244,25 @@ export declare class EventApiClient {
242
244
  * @param config
243
245
  */
244
246
  static hideEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
247
+ /**
248
+ * This endpoint returns the gallery of a specific event.
249
+ * @param id
250
+ * @param params
251
+ * @param config
252
+ */
253
+ static getEventPhotoGallery(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCMediaType>>;
254
+ /**
255
+ * This endpoint adds the media in a gallery of a specific event.
256
+ * @param id
257
+ * @param config
258
+ */
259
+ static addMediaToEventPhotoGallery(id: number | string, config?: AxiosRequestConfig): Promise<SCMediaType>;
260
+ /**
261
+ * This endpoint removes the medias in a gallery of a specific event.
262
+ * @param id
263
+ * @param config
264
+ */
265
+ static removeMediasFromEventPhotoGallery(id: number | string, config?: AxiosRequestConfig): Promise<void>;
245
266
  }
246
267
  /**
247
268
  *
@@ -313,4 +334,7 @@ export default class EventService {
313
334
  static getEventRelated(id: number | string, params?: EventRelatedParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCEventType>>;
314
335
  static showEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
315
336
  static hideEvent(id: number | string, config?: AxiosRequestConfig): Promise<any>;
337
+ static getEventPhotoGallery(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCMediaType>>;
338
+ static addMediaToEventPhotoGallery(id: number | string, config?: AxiosRequestConfig): Promise<SCMediaType>;
339
+ static removeMediasFromEventPhotoGallery(id: number | string, config?: AxiosRequestConfig): Promise<void>;
316
340
  }
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventApiClient = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const apiRequest_1 = require("../../utils/apiRequest");
6
5
  const Endpoints_1 = tslib_1.__importDefault(require("../../constants/Endpoints"));
6
+ const apiRequest_1 = require("../../utils/apiRequest");
7
7
  const url_1 = require("../../utils/url");
8
8
  /**
9
9
  * Contains all the endpoints needed to manage events.
@@ -275,6 +275,32 @@ class EventApiClient {
275
275
  static hideEvent(id, config) {
276
276
  return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.hideEvent.url({ id }), method: Endpoints_1.default.hideEvent.method }));
277
277
  }
278
+ /**
279
+ * This endpoint returns the gallery of a specific event.
280
+ * @param id
281
+ * @param params
282
+ * @param config
283
+ */
284
+ static getEventPhotoGallery(id, params, config) {
285
+ const p = (0, url_1.urlParams)(params);
286
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: `${Endpoints_1.default.GetEventPhotoGallery.url({ id })}?${p.toString()}`, method: Endpoints_1.default.GetEventPhotoGallery.method }));
287
+ }
288
+ /**
289
+ * This endpoint adds the media in a gallery of a specific event.
290
+ * @param id
291
+ * @param config
292
+ */
293
+ static addMediaToEventPhotoGallery(id, config) {
294
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.AddMediaToEventPhotoGallery.url({ id }), method: Endpoints_1.default.AddMediaToEventPhotoGallery.method }));
295
+ }
296
+ /**
297
+ * This endpoint removes the medias in a gallery of a specific event.
298
+ * @param id
299
+ * @param config
300
+ */
301
+ static removeMediasFromEventPhotoGallery(id, config) {
302
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.RemoveMediasFromEventPhotoGallery.url({ id }), method: Endpoints_1.default.RemoveMediasFromEventPhotoGallery.method }));
303
+ }
278
304
  }
279
305
  exports.EventApiClient = EventApiClient;
280
306
  /**
@@ -463,5 +489,20 @@ class EventService {
463
489
  return EventApiClient.hideEvent(id, config);
464
490
  });
465
491
  }
492
+ static getEventPhotoGallery(id, params, config) {
493
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
494
+ return EventApiClient.getEventPhotoGallery(id, params, config);
495
+ });
496
+ }
497
+ static addMediaToEventPhotoGallery(id, config) {
498
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
499
+ return EventApiClient.addMediaToEventPhotoGallery(id, config);
500
+ });
501
+ }
502
+ static removeMediasFromEventPhotoGallery(id, config) {
503
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
504
+ return EventApiClient.removeMediasFromEventPhotoGallery(id, config);
505
+ });
506
+ }
466
507
  }
467
508
  exports.default = EventService;
@@ -11,6 +11,7 @@ export interface GroupApiClientInterface {
11
11
  createGroup(data: GroupCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCGroupType>;
12
12
  updateGroup(id: number | string, data: SCGroupType, config?: AxiosRequestConfig): Promise<SCGroupType>;
13
13
  patchGroup(id: number | string, data: SCGroupType, config?: AxiosRequestConfig): Promise<SCGroupType>;
14
+ deleteGroup(id: number | string, config?: AxiosRequestConfig): Promise<any>;
14
15
  changeGroupAvatarOrCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCGroupType>;
15
16
  getGroupMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
16
17
  getGroupSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
@@ -81,6 +82,12 @@ export declare class GroupApiClient {
81
82
  * @param config
82
83
  */
83
84
  static patchGroup(id: number | string, data: SCGroupType, config?: AxiosRequestConfig): Promise<SCGroupType>;
85
+ /**
86
+ * This endpoint deletes a group.
87
+ * @param id
88
+ * @param config
89
+ */
90
+ static deleteGroup(id: number | string, config?: AxiosRequestConfig): Promise<any>;
84
91
  /**
85
92
  * This endpoint changes the group avatar
86
93
  * @param id
@@ -201,6 +208,7 @@ export default class GroupService {
201
208
  static createGroup(data: GroupCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCGroupType>;
202
209
  static updateGroup(id: number | string, data: SCGroupType, config?: AxiosRequestConfig): Promise<SCGroupType>;
203
210
  static patchGroup(id: number | string, data: SCGroupType, config?: AxiosRequestConfig): Promise<SCGroupType>;
211
+ static deleteGroup(id: number | string, config?: AxiosRequestConfig): Promise<any>;
204
212
  static changeGroupAvatarOrCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCGroupType>;
205
213
  static getGroupMembers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
206
214
  static getGroupSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
@@ -81,6 +81,14 @@ class GroupApiClient {
81
81
  static patchGroup(id, data, config) {
82
82
  return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.PatchGroup.url({ id }), method: Endpoints_1.default.PatchGroup.method, data: data }));
83
83
  }
84
+ /**
85
+ * This endpoint deletes a group.
86
+ * @param id
87
+ * @param config
88
+ */
89
+ static deleteGroup(id, config) {
90
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.DeleteGroup.url({ id }), method: Endpoints_1.default.DeleteGroup.method }));
91
+ }
84
92
  /**
85
93
  * This endpoint changes the group avatar
86
94
  * @param id
@@ -257,6 +265,11 @@ class GroupService {
257
265
  return GroupApiClient.patchGroup(id, data, config);
258
266
  });
259
267
  }
268
+ static deleteGroup(id, config) {
269
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
270
+ return GroupApiClient.deleteGroup(id, config);
271
+ });
272
+ }
260
273
  static changeGroupAvatarOrCover(id, data, config) {
261
274
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
262
275
  return GroupApiClient.changeGroupAvatarOrCover(id, data, config);
@@ -0,0 +1,139 @@
1
+ import { SCLiveStreamConnectionDetailsType, SCLiveStreamMonthlyDurationType, SCLiveStreamType } from '@selfcommunity/types';
2
+ import { AxiosRequestConfig } from 'axios';
3
+ import { SCPaginatedResponse } from '../../types';
4
+ import { LiveStreamCreateParams, LiveStreamRemoveParticipantParams, LiveStreamSearchParams } from '../../types/liveStream';
5
+ export interface LiveStreamApiClientInterface {
6
+ search(params?: LiveStreamSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCLiveStreamType>>;
7
+ getSpecificInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
8
+ create(data: LiveStreamCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
9
+ update(id: number | string, data: SCLiveStreamType, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
10
+ patch(id: number | string, data: SCLiveStreamType, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
11
+ delete(id: number | string, config?: AxiosRequestConfig): Promise<any>;
12
+ close(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
13
+ changeCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
14
+ join(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamConnectionDetailsType>;
15
+ removeParticipant(id: number | string, data: LiveStreamRemoveParticipantParams | FormData, config?: AxiosRequestConfig): Promise<any>;
16
+ getMonthlyDuration(config?: AxiosRequestConfig): Promise<SCLiveStreamMonthlyDurationType>;
17
+ }
18
+ /**
19
+ * Contains all the endpoints needed to manage LiveStreams.
20
+ */
21
+ export declare class LiveStreamApiClient {
22
+ /**
23
+ * This endpoint performs LiveStreams search
24
+ * @param params
25
+ * @param config
26
+ */
27
+ static search(params?: LiveStreamSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCLiveStreamType>>;
28
+ /**
29
+ * This endpoint retrieves a specific LiveStream.
30
+ * @param id
31
+ * @param config
32
+ */
33
+ static getSpecificInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
34
+ /**
35
+ * This endpoint creates an LiveStream.
36
+ * @param data
37
+ * @param config
38
+ */
39
+ static create(data: LiveStreamCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
40
+ /**
41
+ * This endpoint updates an LiveStream.
42
+ * @param id
43
+ * @param data
44
+ * @param config
45
+ */
46
+ static update(id: number | string, data: SCLiveStreamType, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
47
+ /**
48
+ * This endpoint patches an LiveStream.
49
+ * @param id
50
+ * @param data
51
+ * @param config
52
+ */
53
+ static patch(id: number | string, data: SCLiveStreamType, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
54
+ /**
55
+ * This endpoint deletes an LiveStream.
56
+ * @param id
57
+ * @param config
58
+ */
59
+ static delete(id: number | string, config?: AxiosRequestConfig): Promise<any>;
60
+ /**
61
+ * This endpoint allows to close permanently a room
62
+ * @param id
63
+ * @param config
64
+ */
65
+ static close(id: number | string, config?: AxiosRequestConfig): Promise<any>;
66
+ /**
67
+ * This endpoint changes the LiveStream avatar
68
+ * @param id
69
+ * @param data
70
+ * @param config
71
+ */
72
+ static changeCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
73
+ /**
74
+ * This endpoint allows to attend an LiveStream
75
+ * @param id
76
+ * @param config
77
+ */
78
+ static join(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamConnectionDetailsType>;
79
+ /**
80
+ * This endpoint remove participant from the specified live stream.
81
+ * @param id
82
+ * @param data
83
+ * @param config
84
+ */
85
+ static removeParticipant(id: number | string, data: LiveStreamRemoveParticipantParams | FormData, config?: AxiosRequestConfig): Promise<any>;
86
+ /**
87
+ * This endpoint retrieves LiveStream montlhy duration.
88
+ * @param config
89
+ */
90
+ static getMonthlyDuration(config?: AxiosRequestConfig): Promise<SCLiveStreamMonthlyDurationType>;
91
+ }
92
+ /**
93
+ *
94
+ :::tip LiveStream service can be used in the following way:
95
+
96
+ ```jsx
97
+ 1. Import the service from our library:
98
+
99
+ import {LiveStreamService} from "@selfcommunity/api-services";
100
+ ```
101
+ ```jsx
102
+ 2. Create a function and put the service inside it!
103
+ The async function `search` will return the LiveStreams matching the search query.
104
+
105
+ async searchLiveStreams() {
106
+ return await LiveStreamService.search();
107
+ }
108
+ ```
109
+ ```jsx
110
+ In case of required `params`, just add them inside the brackets.
111
+
112
+ async getSpecificInfo(liveStreamId) {
113
+ return await LiveStreamService.getSpecificInfo(liveStreamId);
114
+ }
115
+ ```
116
+ ```jsx
117
+ If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
118
+
119
+ 1. Declare it(or declare them, it is possible to add multiple params)
120
+
121
+ const headers = headers: {Authorization: `Bearer ${yourToken}`}
122
+
123
+ 2. Add it inside the brackets and pass it to the function, as shown in the previous example!
124
+ ```
125
+ :::
126
+ */
127
+ export default class LiveStreamService {
128
+ static search(params?: LiveStreamSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCLiveStreamType>>;
129
+ static getSpecificInfo(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
130
+ static create(data: LiveStreamCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
131
+ static update(id: number | string, data: SCLiveStreamType, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
132
+ static patch(id: number | string, data: SCLiveStreamType, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
133
+ static delete(id: number | string, config?: AxiosRequestConfig): Promise<any>;
134
+ static close(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
135
+ static changeCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCLiveStreamType>;
136
+ static join(id: number | string, config?: AxiosRequestConfig): Promise<SCLiveStreamConnectionDetailsType>;
137
+ static removeParticipant(id: number | string, data: LiveStreamRemoveParticipantParams | FormData, config?: AxiosRequestConfig): Promise<any>;
138
+ static getMonthlyDuration(config?: AxiosRequestConfig): Promise<SCLiveStreamMonthlyDurationType>;
139
+ }