@selfcommunity/api-services 0.6.7-payments.229 → 0.6.7-payments.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/constants/Endpoints.js +12 -0
- package/lib/cjs/index.d.ts +2 -2
- package/lib/cjs/services/feed_object/index.d.ts +28 -1
- package/lib/cjs/services/feed_object/index.js +44 -0
- package/lib/cjs/types/feedObject.d.ts +17 -0
- package/lib/cjs/types/index.d.ts +2 -2
- package/lib/esm/constants/Endpoints.js +12 -0
- package/lib/esm/index.d.ts +2 -2
- package/lib/esm/services/feed_object/index.d.ts +28 -1
- package/lib/esm/services/feed_object/index.js +44 -0
- package/lib/esm/types/feedObject.d.ts +17 -0
- package/lib/esm/types/index.d.ts +2 -2
- package/lib/umd/api-services.js +1 -1
- package/package.json +4 -4
|
@@ -154,6 +154,18 @@ const Endpoints = {
|
|
|
154
154
|
url: (0, utils_1.urlReplacer)('/api/v2/$(type)/$(id)/flag/'),
|
|
155
155
|
method: 'POST'
|
|
156
156
|
},
|
|
157
|
+
GetScheduledFeedObjects: {
|
|
158
|
+
url: (0, utils_1.urlReplacer)('/api/v2/$(type)/scheduled/'),
|
|
159
|
+
method: 'GET'
|
|
160
|
+
},
|
|
161
|
+
PublishFeedObject: {
|
|
162
|
+
url: (0, utils_1.urlReplacer)('/api/v2/$(type)/$(id)/publish/'),
|
|
163
|
+
method: 'POST'
|
|
164
|
+
},
|
|
165
|
+
GetDraftedFeedObjects: {
|
|
166
|
+
url: (0, utils_1.urlReplacer)('/api/v2/$(type)/drafted/'),
|
|
167
|
+
method: 'GET'
|
|
168
|
+
},
|
|
157
169
|
/**
|
|
158
170
|
* Comments
|
|
159
171
|
*/
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -56,8 +56,8 @@ import CommunityService, { CommunityApiClient, CommunityApiClientInterface } fro
|
|
|
56
56
|
/**
|
|
57
57
|
* Types
|
|
58
58
|
*/
|
|
59
|
-
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, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams } from './types';
|
|
59
|
+
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, ScheduledFeedObjParams, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventSearchParams, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, StartStepParams, OnBoardingStep, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams } from './types';
|
|
60
60
|
/**
|
|
61
61
|
* Export all
|
|
62
62
|
*/
|
|
63
|
-
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, CourseCreateParams, CourseSearchParams, CourseInfoParams, CourseInfoViewType, CourseService, CourseApiClientInterface, CourseApiClient, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentService, PaymentApiClientInterface, PaymentApiClient, CommunityService, CommunityApiClient, CommunityApiClientInterface, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|
|
63
|
+
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, ScheduledFeedObjParams, 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, CourseCreateParams, CourseSearchParams, CourseInfoParams, CourseInfoViewType, CourseService, CourseApiClientInterface, CourseApiClient, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentService, PaymentApiClientInterface, PaymentApiClient, CommunityService, CommunityApiClient, CommunityApiClientInterface, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseGetParams, BaseSearchParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedObjGetParams, SCPaginatedResponse } from '../../types';
|
|
1
|
+
import { BaseGetParams, BaseSearchParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedObjGetParams, SCPaginatedResponse, ScheduledFeedObjParams } from '../../types';
|
|
2
2
|
import { SCContributionType, SCFeedObjectFollowingStatusType, SCFeedObjectHideStatusType, SCFeedObjectSuspendedStatusType, SCFeedObjectType, SCFlagType, SCFlagTypeEnum, SCPollVoteType, SCUserType, SCVoteType } from '@selfcommunity/types';
|
|
3
3
|
import { AxiosRequestConfig } from 'axios';
|
|
4
4
|
export interface FeedObjectApiClientInterface {
|
|
@@ -29,6 +29,9 @@ export interface FeedObjectApiClientInterface {
|
|
|
29
29
|
feedObjectFlagStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFlagType>>;
|
|
30
30
|
hideFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
31
31
|
feedObjectHideStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectHideStatusType>;
|
|
32
|
+
feedObjectScheduledList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: ScheduledFeedObjParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
33
|
+
feedObjectDraftedList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
34
|
+
publishFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectType>;
|
|
32
35
|
}
|
|
33
36
|
/**
|
|
34
37
|
* Contains all the endpoints needed to manage feed objs (discussions-posts-statuses).
|
|
@@ -233,6 +236,27 @@ export declare class FeedObjectApiClient {
|
|
|
233
236
|
* @param config
|
|
234
237
|
*/
|
|
235
238
|
static feedObjectHideStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectHideStatusType>;
|
|
239
|
+
/**
|
|
240
|
+
* This endpoint retrieves the list of scheduled feed objects
|
|
241
|
+
* @param type
|
|
242
|
+
* @param params
|
|
243
|
+
* @param config
|
|
244
|
+
*/
|
|
245
|
+
static feedObjectScheduledList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: ScheduledFeedObjParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
246
|
+
/**
|
|
247
|
+
* This endpoint retrieves the list of drafted feed objects
|
|
248
|
+
* @param type
|
|
249
|
+
* @param params
|
|
250
|
+
* @param config
|
|
251
|
+
*/
|
|
252
|
+
static feedObjectDraftedList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
253
|
+
/**
|
|
254
|
+
* This endpoint publishes a drafted or scheduled the feed obj.
|
|
255
|
+
* @param type
|
|
256
|
+
* @param id
|
|
257
|
+
* @param config
|
|
258
|
+
*/
|
|
259
|
+
static publishFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectType>;
|
|
236
260
|
}
|
|
237
261
|
/**
|
|
238
262
|
*
|
|
@@ -290,4 +314,7 @@ export default class FeedObjectService {
|
|
|
290
314
|
static feedObjectFlagStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFlagType>>;
|
|
291
315
|
static hideFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
292
316
|
static feedObjectHideStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectHideStatusType>;
|
|
317
|
+
static feedObjectScheduledList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: ScheduledFeedObjParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
318
|
+
static feedObjectDraftedList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
319
|
+
static publishFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectType>;
|
|
293
320
|
}
|
|
@@ -274,6 +274,35 @@ class FeedObjectApiClient {
|
|
|
274
274
|
static feedObjectHideStatus(type, id, config) {
|
|
275
275
|
return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.FeedObjectHideStatus.url({ type, id }), method: Endpoints_1.default.FeedObjectHideStatus.method }));
|
|
276
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* This endpoint retrieves the list of scheduled feed objects
|
|
279
|
+
* @param type
|
|
280
|
+
* @param params
|
|
281
|
+
* @param config
|
|
282
|
+
*/
|
|
283
|
+
static feedObjectScheduledList(type, params, config) {
|
|
284
|
+
const p = (0, url_1.urlParams)(params);
|
|
285
|
+
return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: `${Endpoints_1.default.GetScheduledFeedObjects.url({ type })}?${p.toString()}`, method: Endpoints_1.default.GetScheduledFeedObjects.method }));
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* This endpoint retrieves the list of drafted feed objects
|
|
289
|
+
* @param type
|
|
290
|
+
* @param params
|
|
291
|
+
* @param config
|
|
292
|
+
*/
|
|
293
|
+
static feedObjectDraftedList(type, params, config) {
|
|
294
|
+
const p = (0, url_1.urlParams)(params);
|
|
295
|
+
return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: `${Endpoints_1.default.GetDraftedFeedObjects.url({ type })}?${p.toString()}`, method: Endpoints_1.default.GetDraftedFeedObjects.method }));
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* This endpoint publishes a drafted or scheduled the feed obj.
|
|
299
|
+
* @param type
|
|
300
|
+
* @param id
|
|
301
|
+
* @param config
|
|
302
|
+
*/
|
|
303
|
+
static publishFeedObject(type, id, config) {
|
|
304
|
+
return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.PublishFeedObject.url({ type, id }), method: Endpoints_1.default.PublishFeedObject.method }));
|
|
305
|
+
}
|
|
277
306
|
}
|
|
278
307
|
exports.FeedObjectApiClient = FeedObjectApiClient;
|
|
279
308
|
/**
|
|
@@ -440,5 +469,20 @@ class FeedObjectService {
|
|
|
440
469
|
return FeedObjectApiClient.feedObjectHideStatus(type, id, config);
|
|
441
470
|
});
|
|
442
471
|
}
|
|
472
|
+
static feedObjectScheduledList(type, params, config) {
|
|
473
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
474
|
+
return FeedObjectApiClient.feedObjectScheduledList(type, params, config);
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
static feedObjectDraftedList(type, params, config) {
|
|
478
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
479
|
+
return FeedObjectApiClient.feedObjectDraftedList(type, params, config);
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
static publishFeedObject(type, id, config) {
|
|
483
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
484
|
+
return FeedObjectApiClient.publishFeedObject(type, id, config);
|
|
485
|
+
});
|
|
486
|
+
}
|
|
443
487
|
}
|
|
444
488
|
exports.default = FeedObjectService;
|
|
@@ -43,6 +43,10 @@ export interface FeedObjCreateParams {
|
|
|
43
43
|
* The list of tag ids.
|
|
44
44
|
*/
|
|
45
45
|
addressing?: number[];
|
|
46
|
+
/**
|
|
47
|
+
* If the feed obj is not published yet
|
|
48
|
+
*/
|
|
49
|
+
draft?: boolean;
|
|
46
50
|
}
|
|
47
51
|
/**
|
|
48
52
|
* FeedObjectPollVotesSearch interface
|
|
@@ -53,3 +57,16 @@ export interface FeedObjectPollVotesSearch extends BaseGetParams {
|
|
|
53
57
|
*/
|
|
54
58
|
choice?: number;
|
|
55
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* ScheduledFeedObjParams interface
|
|
62
|
+
*/
|
|
63
|
+
export interface ScheduledFeedObjParams {
|
|
64
|
+
/**
|
|
65
|
+
* Includes posts that were scheduled and already published
|
|
66
|
+
*/
|
|
67
|
+
include_published?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Show only posts that were scheduled and already published
|
|
70
|
+
*/
|
|
71
|
+
only_published?: boolean;
|
|
72
|
+
}
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { CustomAdvParams } from './customAdv';
|
|
|
16
16
|
import { CustomPageParams, CustomPageSearchParams } from './customPage';
|
|
17
17
|
import { EmbedUpdateParams, EmbedSearchParams } from './embed';
|
|
18
18
|
import { BaseGetParams, BaseSearchParams } from './baseParams';
|
|
19
|
-
import { FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch } from './feedObject';
|
|
19
|
+
import { FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, ScheduledFeedObjParams } from './feedObject';
|
|
20
20
|
import { FeedParams } from './feed';
|
|
21
21
|
import { LegalPageFilterParams } from './legalPage';
|
|
22
22
|
import { FeatureParams } from './feature';
|
|
@@ -29,4 +29,4 @@ import { LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemovePartici
|
|
|
29
29
|
import { StartStepParams, OnBoardingStep } from './onBoarding';
|
|
30
30
|
import { CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams } from './course';
|
|
31
31
|
import { PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams } from './payment';
|
|
32
|
-
export { AccountCreateParams, AccountVerifyParams, AccountRecoverParams, AccountResetParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserGetParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadCompleteParams, ChunkUploadParams, ThreadParams, ThreadDeleteParams, 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, EventRelatedParams, EventSearchParams, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, StartStepParams, OnBoardingStep, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|
|
32
|
+
export { AccountCreateParams, AccountVerifyParams, AccountRecoverParams, AccountResetParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserGetParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadCompleteParams, ChunkUploadParams, ThreadParams, ThreadDeleteParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, ScheduledFeedObjParams, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventRelatedParams, EventSearchParams, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, StartStepParams, OnBoardingStep, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|
|
@@ -152,6 +152,18 @@ const Endpoints = {
|
|
|
152
152
|
url: urlReplacer('/api/v2/$(type)/$(id)/flag/'),
|
|
153
153
|
method: 'POST'
|
|
154
154
|
},
|
|
155
|
+
GetScheduledFeedObjects: {
|
|
156
|
+
url: urlReplacer('/api/v2/$(type)/scheduled/'),
|
|
157
|
+
method: 'GET'
|
|
158
|
+
},
|
|
159
|
+
PublishFeedObject: {
|
|
160
|
+
url: urlReplacer('/api/v2/$(type)/$(id)/publish/'),
|
|
161
|
+
method: 'POST'
|
|
162
|
+
},
|
|
163
|
+
GetDraftedFeedObjects: {
|
|
164
|
+
url: urlReplacer('/api/v2/$(type)/drafted/'),
|
|
165
|
+
method: 'GET'
|
|
166
|
+
},
|
|
155
167
|
/**
|
|
156
168
|
* Comments
|
|
157
169
|
*/
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -56,8 +56,8 @@ import CommunityService, { CommunityApiClient, CommunityApiClientInterface } fro
|
|
|
56
56
|
/**
|
|
57
57
|
* Types
|
|
58
58
|
*/
|
|
59
|
-
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, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams } from './types';
|
|
59
|
+
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, ScheduledFeedObjParams, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventSearchParams, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, StartStepParams, OnBoardingStep, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams } from './types';
|
|
60
60
|
/**
|
|
61
61
|
* Export all
|
|
62
62
|
*/
|
|
63
|
-
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, CourseCreateParams, CourseSearchParams, CourseInfoParams, CourseInfoViewType, CourseService, CourseApiClientInterface, CourseApiClient, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentService, PaymentApiClientInterface, PaymentApiClient, CommunityService, CommunityApiClient, CommunityApiClientInterface, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|
|
63
|
+
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, ScheduledFeedObjParams, 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, CourseCreateParams, CourseSearchParams, CourseInfoParams, CourseInfoViewType, CourseService, CourseApiClientInterface, CourseApiClient, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentService, PaymentApiClientInterface, PaymentApiClient, CommunityService, CommunityApiClient, CommunityApiClientInterface, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseGetParams, BaseSearchParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedObjGetParams, SCPaginatedResponse } from '../../types';
|
|
1
|
+
import { BaseGetParams, BaseSearchParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedObjGetParams, SCPaginatedResponse, ScheduledFeedObjParams } from '../../types';
|
|
2
2
|
import { SCContributionType, SCFeedObjectFollowingStatusType, SCFeedObjectHideStatusType, SCFeedObjectSuspendedStatusType, SCFeedObjectType, SCFlagType, SCFlagTypeEnum, SCPollVoteType, SCUserType, SCVoteType } from '@selfcommunity/types';
|
|
3
3
|
import { AxiosRequestConfig } from 'axios';
|
|
4
4
|
export interface FeedObjectApiClientInterface {
|
|
@@ -29,6 +29,9 @@ export interface FeedObjectApiClientInterface {
|
|
|
29
29
|
feedObjectFlagStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFlagType>>;
|
|
30
30
|
hideFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
31
31
|
feedObjectHideStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectHideStatusType>;
|
|
32
|
+
feedObjectScheduledList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: ScheduledFeedObjParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
33
|
+
feedObjectDraftedList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
34
|
+
publishFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectType>;
|
|
32
35
|
}
|
|
33
36
|
/**
|
|
34
37
|
* Contains all the endpoints needed to manage feed objs (discussions-posts-statuses).
|
|
@@ -233,6 +236,27 @@ export declare class FeedObjectApiClient {
|
|
|
233
236
|
* @param config
|
|
234
237
|
*/
|
|
235
238
|
static feedObjectHideStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectHideStatusType>;
|
|
239
|
+
/**
|
|
240
|
+
* This endpoint retrieves the list of scheduled feed objects
|
|
241
|
+
* @param type
|
|
242
|
+
* @param params
|
|
243
|
+
* @param config
|
|
244
|
+
*/
|
|
245
|
+
static feedObjectScheduledList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: ScheduledFeedObjParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
246
|
+
/**
|
|
247
|
+
* This endpoint retrieves the list of drafted feed objects
|
|
248
|
+
* @param type
|
|
249
|
+
* @param params
|
|
250
|
+
* @param config
|
|
251
|
+
*/
|
|
252
|
+
static feedObjectDraftedList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
253
|
+
/**
|
|
254
|
+
* This endpoint publishes a drafted or scheduled the feed obj.
|
|
255
|
+
* @param type
|
|
256
|
+
* @param id
|
|
257
|
+
* @param config
|
|
258
|
+
*/
|
|
259
|
+
static publishFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectType>;
|
|
236
260
|
}
|
|
237
261
|
/**
|
|
238
262
|
*
|
|
@@ -290,4 +314,7 @@ export default class FeedObjectService {
|
|
|
290
314
|
static feedObjectFlagStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFlagType>>;
|
|
291
315
|
static hideFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
292
316
|
static feedObjectHideStatus(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectHideStatusType>;
|
|
317
|
+
static feedObjectScheduledList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: ScheduledFeedObjParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
318
|
+
static feedObjectDraftedList(type: Exclude<SCContributionType, SCContributionType.COMMENT>, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedObjectType>>;
|
|
319
|
+
static publishFeedObject(type: Exclude<SCContributionType, SCContributionType.COMMENT>, id: number | string, config?: AxiosRequestConfig): Promise<SCFeedObjectType>;
|
|
293
320
|
}
|
|
@@ -271,6 +271,35 @@ export class FeedObjectApiClient {
|
|
|
271
271
|
static feedObjectHideStatus(type, id, config) {
|
|
272
272
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.FeedObjectHideStatus.url({ type, id }), method: Endpoints.FeedObjectHideStatus.method }));
|
|
273
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* This endpoint retrieves the list of scheduled feed objects
|
|
276
|
+
* @param type
|
|
277
|
+
* @param params
|
|
278
|
+
* @param config
|
|
279
|
+
*/
|
|
280
|
+
static feedObjectScheduledList(type, params, config) {
|
|
281
|
+
const p = urlParams(params);
|
|
282
|
+
return apiRequest(Object.assign(Object.assign({}, config), { url: `${Endpoints.GetScheduledFeedObjects.url({ type })}?${p.toString()}`, method: Endpoints.GetScheduledFeedObjects.method }));
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* This endpoint retrieves the list of drafted feed objects
|
|
286
|
+
* @param type
|
|
287
|
+
* @param params
|
|
288
|
+
* @param config
|
|
289
|
+
*/
|
|
290
|
+
static feedObjectDraftedList(type, params, config) {
|
|
291
|
+
const p = urlParams(params);
|
|
292
|
+
return apiRequest(Object.assign(Object.assign({}, config), { url: `${Endpoints.GetDraftedFeedObjects.url({ type })}?${p.toString()}`, method: Endpoints.GetDraftedFeedObjects.method }));
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* This endpoint publishes a drafted or scheduled the feed obj.
|
|
296
|
+
* @param type
|
|
297
|
+
* @param id
|
|
298
|
+
* @param config
|
|
299
|
+
*/
|
|
300
|
+
static publishFeedObject(type, id, config) {
|
|
301
|
+
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.PublishFeedObject.url({ type, id }), method: Endpoints.PublishFeedObject.method }));
|
|
302
|
+
}
|
|
274
303
|
}
|
|
275
304
|
/**
|
|
276
305
|
*
|
|
@@ -436,4 +465,19 @@ export default class FeedObjectService {
|
|
|
436
465
|
return FeedObjectApiClient.feedObjectHideStatus(type, id, config);
|
|
437
466
|
});
|
|
438
467
|
}
|
|
468
|
+
static feedObjectScheduledList(type, params, config) {
|
|
469
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
470
|
+
return FeedObjectApiClient.feedObjectScheduledList(type, params, config);
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
static feedObjectDraftedList(type, params, config) {
|
|
474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
475
|
+
return FeedObjectApiClient.feedObjectDraftedList(type, params, config);
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
static publishFeedObject(type, id, config) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
480
|
+
return FeedObjectApiClient.publishFeedObject(type, id, config);
|
|
481
|
+
});
|
|
482
|
+
}
|
|
439
483
|
}
|
|
@@ -43,6 +43,10 @@ export interface FeedObjCreateParams {
|
|
|
43
43
|
* The list of tag ids.
|
|
44
44
|
*/
|
|
45
45
|
addressing?: number[];
|
|
46
|
+
/**
|
|
47
|
+
* If the feed obj is not published yet
|
|
48
|
+
*/
|
|
49
|
+
draft?: boolean;
|
|
46
50
|
}
|
|
47
51
|
/**
|
|
48
52
|
* FeedObjectPollVotesSearch interface
|
|
@@ -53,3 +57,16 @@ export interface FeedObjectPollVotesSearch extends BaseGetParams {
|
|
|
53
57
|
*/
|
|
54
58
|
choice?: number;
|
|
55
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* ScheduledFeedObjParams interface
|
|
62
|
+
*/
|
|
63
|
+
export interface ScheduledFeedObjParams {
|
|
64
|
+
/**
|
|
65
|
+
* Includes posts that were scheduled and already published
|
|
66
|
+
*/
|
|
67
|
+
include_published?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Show only posts that were scheduled and already published
|
|
70
|
+
*/
|
|
71
|
+
only_published?: boolean;
|
|
72
|
+
}
|
package/lib/esm/types/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { CustomAdvParams } from './customAdv';
|
|
|
16
16
|
import { CustomPageParams, CustomPageSearchParams } from './customPage';
|
|
17
17
|
import { EmbedUpdateParams, EmbedSearchParams } from './embed';
|
|
18
18
|
import { BaseGetParams, BaseSearchParams } from './baseParams';
|
|
19
|
-
import { FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch } from './feedObject';
|
|
19
|
+
import { FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, ScheduledFeedObjParams } from './feedObject';
|
|
20
20
|
import { FeedParams } from './feed';
|
|
21
21
|
import { LegalPageFilterParams } from './legalPage';
|
|
22
22
|
import { FeatureParams } from './feature';
|
|
@@ -29,4 +29,4 @@ import { LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemovePartici
|
|
|
29
29
|
import { StartStepParams, OnBoardingStep } from './onBoarding';
|
|
30
30
|
import { CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams } from './course';
|
|
31
31
|
import { PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams } from './payment';
|
|
32
|
-
export { AccountCreateParams, AccountVerifyParams, AccountRecoverParams, AccountResetParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserGetParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadCompleteParams, ChunkUploadParams, ThreadParams, ThreadDeleteParams, 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, EventRelatedParams, EventSearchParams, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, StartStepParams, OnBoardingStep, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|
|
32
|
+
export { AccountCreateParams, AccountVerifyParams, AccountRecoverParams, AccountResetParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserGetParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadCompleteParams, ChunkUploadParams, ThreadParams, ThreadDeleteParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, ScheduledFeedObjParams, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventRelatedParams, EventSearchParams, LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams, StartStepParams, OnBoardingStep, CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams, PaymentContentStatusParams, PaymentContentStatus, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
|