@selfcommunity/api-services 0.6.7-payments.156 → 0.6.7-payments.161

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.
@@ -1632,7 +1632,7 @@ const Endpoints = {
1632
1632
  method: 'POST'
1633
1633
  },
1634
1634
  GetPaymentOrders: {
1635
- url: (0, utils_1.urlReplacer)('/api/v2/payments/order/'),
1635
+ url: (0, utils_1.urlReplacer)('/api/v2/payments/payment_order/'),
1636
1636
  method: 'GET'
1637
1637
  },
1638
1638
  CreateCustomerPortalSession: {
@@ -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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams } 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, 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, 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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams };
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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
@@ -1,19 +1,19 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { BaseGetParams, SCPaginatedResponse } from '../../types';
3
- import { SCCommunity } from '@selfcommunity/types';
3
+ import { SCCommunityType } from '@selfcommunity/types';
4
4
  export interface CommunityApiClientInterface {
5
5
  /**
6
6
  * Get list of communities. Used to get the payment products related to the community (aka paywalls)
7
7
  * @param params
8
8
  * @param config
9
9
  */
10
- getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunity>>;
10
+ getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunityType>>;
11
11
  /**
12
12
  * Get Community
13
13
  * @param id
14
14
  * @param config
15
15
  */
16
- getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunity>;
16
+ getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunityType>;
17
17
  }
18
18
  /**
19
19
  * Contains all the endpoints needed to manage payments.
@@ -24,13 +24,13 @@ export declare class CommunityApiClient {
24
24
  * @param params
25
25
  * @param config
26
26
  */
27
- static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunity>>;
27
+ static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunityType>>;
28
28
  /**
29
29
  * Get Community
30
30
  * @param id
31
31
  * @param config
32
32
  */
33
- static getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunity>;
33
+ static getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunityType>;
34
34
  }
35
35
  /**
36
36
  *
@@ -60,6 +60,6 @@ export declare class CommunityApiClient {
60
60
  :::
61
61
  */
62
62
  export default class CommunityService {
63
- static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunity>>;
64
- static getPaymentProduct(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunity>;
63
+ static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunityType>>;
64
+ static getPaymentProduct(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunityType>;
65
65
  }
@@ -1,11 +1,11 @@
1
1
  import { SCCourseCommentType, SCCourseLessonType, SCCourseSectionType, SCCourseType, SCUserType } from '@selfcommunity/types';
2
2
  import { AxiosRequestConfig } from 'axios';
3
- import { BaseGetParams, BaseSearchParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
3
+ import { BaseGetParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
4
4
  import { CourseSectionParams, CourseUserParams } from '../../types/course';
5
5
  export interface CourseApiClientInterface {
6
6
  changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
7
7
  getJoinedCourses(params?: CourseUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
8
- getUserJoinedCourses(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
8
+ getUserJoinedCourses(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
9
9
  searchCourses(params?: CourseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
10
10
  getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
11
11
  getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
@@ -71,9 +71,10 @@ export declare class CourseApiClient {
71
71
  /**
72
72
  * This endpoint retrieves a specific course.
73
73
  * @param id
74
+ * @param params
74
75
  * @param config
75
76
  */
76
- static getUserJoinedCourses(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
77
+ static getUserJoinedCourses(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
77
78
  /**
78
79
  * This endpoint performs events search
79
80
  * @param params
@@ -401,7 +402,7 @@ export declare class CourseApiClient {
401
402
  export default class CourseService {
402
403
  static changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
403
404
  static getJoinedCourses(params?: CourseUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
404
- static getUserJoinedCourses(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
405
+ static getUserJoinedCourses(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
405
406
  static searchCourses(params?: CourseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
406
407
  static getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
407
408
  static getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
@@ -30,10 +30,11 @@ class CourseApiClient {
30
30
  /**
31
31
  * This endpoint retrieves a specific course.
32
32
  * @param id
33
+ * @param params
33
34
  * @param config
34
35
  */
35
- static getUserJoinedCourses(id, config) {
36
- return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.GetUserJoinedCourses.url({ id }), method: Endpoints_1.default.GetUserJoinedCourses.method }));
36
+ static getUserJoinedCourses(id, params, config) {
37
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { params, url: Endpoints_1.default.GetUserJoinedCourses.url({ id }), method: Endpoints_1.default.GetUserJoinedCourses.method }));
37
38
  }
38
39
  /**
39
40
  * This endpoint performs events search
@@ -444,9 +445,9 @@ class CourseService {
444
445
  return CourseApiClient.getJoinedCourses(params, config);
445
446
  });
446
447
  }
447
- static getUserJoinedCourses(id, config) {
448
+ static getUserJoinedCourses(id, params, config) {
448
449
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
449
- return CourseApiClient.getUserJoinedCourses(id, config);
450
+ return CourseApiClient.getUserJoinedCourses(id, params, config);
450
451
  });
451
452
  }
452
453
  static searchCourses(params, config) {
@@ -1,6 +1,6 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { BaseGetParams, PaymentContentStatusParams, SCPaginatedResponse } from '../../types';
3
- import { CheckoutCreateSessionParams, CheckoutSessionParams, PaymentProductsParams, CustomerPortalCreateSessionParams } from '../../types/payment';
2
+ import { BaseGetParams, SCPaginatedResponse } from '../../types';
3
+ import { CheckoutCreateSessionParams, CheckoutSessionParams, PaymentProductsParams, CustomerPortalCreateSessionParams, PaymentContentStatusParams, PaymentOrderParams } from '../../types/payment';
4
4
  import { SCCheckoutSession, SCPaymentOrder, SCCheckoutSessionDetail, SCCheckoutSessionComplete, SCPaymentProduct, SCPaymentPrice, SCPaymentsCustomerPortalSession, SCPurchasableContent } from '@selfcommunity/types';
5
5
  export interface PaymentApiClientInterface {
6
6
  /**
@@ -57,7 +57,7 @@ export interface PaymentApiClientInterface {
57
57
  * @param params
58
58
  * @param config
59
59
  */
60
- getPaymentsOrder(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
60
+ getPaymentsOrder(params?: PaymentOrderParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
61
61
  /**
62
62
  * This endpoint retrieve customer portal
63
63
  * @param data
@@ -123,7 +123,7 @@ export declare class PaymentApiClient {
123
123
  * @param params
124
124
  * @param config
125
125
  */
126
- static getPaymentsOrder(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
126
+ static getPaymentsOrder(params?: PaymentOrderParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
127
127
  /**
128
128
  * This endpoint retrive customer portal
129
129
  * @param data
@@ -175,6 +175,6 @@ export default class PaymentService {
175
175
  static checkoutCreateSession(data: CheckoutCreateSessionParams | FormData, config?: AxiosRequestConfig): Promise<SCCheckoutSession>;
176
176
  static getCheckoutSession(params?: CheckoutSessionParams, config?: AxiosRequestConfig): Promise<SCCheckoutSessionDetail>;
177
177
  static checkoutCompleteSession(data: CheckoutSessionParams | FormData, config?: AxiosRequestConfig): Promise<SCCheckoutSessionComplete>;
178
- static getPaymentsOrder(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
178
+ static getPaymentsOrder(params?: PaymentOrderParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
179
179
  static getPaymentsCustomerPortal(data: CustomerPortalCreateSessionParams | FormData, config?: AxiosRequestConfig): Promise<SCPaymentsCustomerPortalSession>;
180
180
  }
@@ -85,7 +85,8 @@ class PaymentApiClient {
85
85
  * @param config
86
86
  */
87
87
  static getPaymentsOrder(params, config) {
88
- return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.GetPaymentOrders.url({}), method: Endpoints_1.default.GetPaymentOrders.method }));
88
+ const p = (0, url_1.urlParams)(params);
89
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: `${Endpoints_1.default.GetPaymentOrders.url({})}?${p.toString()}`, method: Endpoints_1.default.GetPaymentOrders.method }));
89
90
  }
90
91
  /**
91
92
  * This endpoint retrive customer portal
@@ -35,14 +35,14 @@ export interface CourseSectionParams {
35
35
  * CourseUserParams interface.
36
36
  */
37
37
  export interface CourseUserParams extends BaseGetParams {
38
- /**
39
- * Filter results by subscription_status
40
- */
41
- join_status?: SCCourseJoinStatusType;
42
38
  /**
43
39
  * Return only courses created by this user id
44
40
  */
45
41
  created_by?: number;
42
+ /**
43
+ * Filter by join_status; default: ["manager", "joined"]
44
+ */
45
+ statuses?: SCCourseJoinStatusType[] | SCCourseJoinStatusType;
46
46
  }
47
47
  /**
48
48
  * CourseSearchParams interface.
@@ -110,7 +110,7 @@ export interface CourseUsersParams extends BaseGetParams {
110
110
  * Filter by join_status; default: ["manager", "joined"].
111
111
  * Only creator, manager and joined are valid status for this route
112
112
  */
113
- statuses?: SCCourseJoinStatusType[];
113
+ statuses?: SCCourseJoinStatusType[] | SCCourseJoinStatusType;
114
114
  }
115
115
  /**
116
116
  * CourseDashboardUsersParams interface.
@@ -28,5 +28,5 @@ import { EventCreateParams, EventFeedParams, EventRelatedParams, EventSearchPara
28
28
  import { LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams } from './liveStream';
29
29
  import { StartStepParams, OnBoardingStep } from './onBoarding';
30
30
  import { CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams } from './course';
31
- import { PaymentContentStatusParams, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams } 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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams };
31
+ import { PaymentContentStatusParams, 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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
@@ -1,4 +1,4 @@
1
- import { BaseGetParams } from './baseParams';
1
+ import { BaseGetParams, BaseSearchParams } from './baseParams';
2
2
  import { SCCheckoutSessionUIMode, SCContentType } from '@selfcommunity/types';
3
3
  /**
4
4
  * PaymentParams interface.
@@ -68,3 +68,12 @@ export interface PaymentContentStatusParams extends BaseGetParams {
68
68
  */
69
69
  content_type?: SCContentType;
70
70
  }
71
+ /**
72
+ * PaymentOrderParams interface.
73
+ */
74
+ export interface PaymentOrderParams extends BaseSearchParams {
75
+ /**
76
+ * Ordering
77
+ */
78
+ order_by?: string;
79
+ }
@@ -1630,7 +1630,7 @@ const Endpoints = {
1630
1630
  method: 'POST'
1631
1631
  },
1632
1632
  GetPaymentOrders: {
1633
- url: urlReplacer('/api/v2/payments/order/'),
1633
+ url: urlReplacer('/api/v2/payments/payment_order/'),
1634
1634
  method: 'GET'
1635
1635
  },
1636
1636
  CreateCustomerPortalSession: {
@@ -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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams } 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, 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, 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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams };
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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
@@ -1,19 +1,19 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { BaseGetParams, SCPaginatedResponse } from '../../types';
3
- import { SCCommunity } from '@selfcommunity/types';
3
+ import { SCCommunityType } from '@selfcommunity/types';
4
4
  export interface CommunityApiClientInterface {
5
5
  /**
6
6
  * Get list of communities. Used to get the payment products related to the community (aka paywalls)
7
7
  * @param params
8
8
  * @param config
9
9
  */
10
- getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunity>>;
10
+ getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunityType>>;
11
11
  /**
12
12
  * Get Community
13
13
  * @param id
14
14
  * @param config
15
15
  */
16
- getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunity>;
16
+ getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunityType>;
17
17
  }
18
18
  /**
19
19
  * Contains all the endpoints needed to manage payments.
@@ -24,13 +24,13 @@ export declare class CommunityApiClient {
24
24
  * @param params
25
25
  * @param config
26
26
  */
27
- static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunity>>;
27
+ static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunityType>>;
28
28
  /**
29
29
  * Get Community
30
30
  * @param id
31
31
  * @param config
32
32
  */
33
- static getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunity>;
33
+ static getCommunity(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunityType>;
34
34
  }
35
35
  /**
36
36
  *
@@ -60,6 +60,6 @@ export declare class CommunityApiClient {
60
60
  :::
61
61
  */
62
62
  export default class CommunityService {
63
- static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunity>>;
64
- static getPaymentProduct(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunity>;
63
+ static getCommunities(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCommunityType>>;
64
+ static getPaymentProduct(id: number | string, config?: AxiosRequestConfig): Promise<SCCommunityType>;
65
65
  }
@@ -1,11 +1,11 @@
1
1
  import { SCCourseCommentType, SCCourseLessonType, SCCourseSectionType, SCCourseType, SCUserType } from '@selfcommunity/types';
2
2
  import { AxiosRequestConfig } from 'axios';
3
- import { BaseGetParams, BaseSearchParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
3
+ import { BaseGetParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
4
4
  import { CourseSectionParams, CourseUserParams } from '../../types/course';
5
5
  export interface CourseApiClientInterface {
6
6
  changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
7
7
  getJoinedCourses(params?: CourseUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
8
- getUserJoinedCourses(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
8
+ getUserJoinedCourses(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
9
9
  searchCourses(params?: CourseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
10
10
  getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
11
11
  getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
@@ -71,9 +71,10 @@ export declare class CourseApiClient {
71
71
  /**
72
72
  * This endpoint retrieves a specific course.
73
73
  * @param id
74
+ * @param params
74
75
  * @param config
75
76
  */
76
- static getUserJoinedCourses(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
77
+ static getUserJoinedCourses(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
77
78
  /**
78
79
  * This endpoint performs events search
79
80
  * @param params
@@ -401,7 +402,7 @@ export declare class CourseApiClient {
401
402
  export default class CourseService {
402
403
  static changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
403
404
  static getJoinedCourses(params?: CourseUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
404
- static getUserJoinedCourses(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
405
+ static getUserJoinedCourses(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
405
406
  static searchCourses(params?: CourseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
406
407
  static getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
407
408
  static getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
@@ -27,10 +27,11 @@ export class CourseApiClient {
27
27
  /**
28
28
  * This endpoint retrieves a specific course.
29
29
  * @param id
30
+ * @param params
30
31
  * @param config
31
32
  */
32
- static getUserJoinedCourses(id, config) {
33
- return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.GetUserJoinedCourses.url({ id }), method: Endpoints.GetUserJoinedCourses.method }));
33
+ static getUserJoinedCourses(id, params, config) {
34
+ return apiRequest(Object.assign(Object.assign({}, config), { params, url: Endpoints.GetUserJoinedCourses.url({ id }), method: Endpoints.GetUserJoinedCourses.method }));
34
35
  }
35
36
  /**
36
37
  * This endpoint performs events search
@@ -440,9 +441,9 @@ export default class CourseService {
440
441
  return CourseApiClient.getJoinedCourses(params, config);
441
442
  });
442
443
  }
443
- static getUserJoinedCourses(id, config) {
444
+ static getUserJoinedCourses(id, params, config) {
444
445
  return __awaiter(this, void 0, void 0, function* () {
445
- return CourseApiClient.getUserJoinedCourses(id, config);
446
+ return CourseApiClient.getUserJoinedCourses(id, params, config);
446
447
  });
447
448
  }
448
449
  static searchCourses(params, config) {
@@ -1,6 +1,6 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { BaseGetParams, PaymentContentStatusParams, SCPaginatedResponse } from '../../types';
3
- import { CheckoutCreateSessionParams, CheckoutSessionParams, PaymentProductsParams, CustomerPortalCreateSessionParams } from '../../types/payment';
2
+ import { BaseGetParams, SCPaginatedResponse } from '../../types';
3
+ import { CheckoutCreateSessionParams, CheckoutSessionParams, PaymentProductsParams, CustomerPortalCreateSessionParams, PaymentContentStatusParams, PaymentOrderParams } from '../../types/payment';
4
4
  import { SCCheckoutSession, SCPaymentOrder, SCCheckoutSessionDetail, SCCheckoutSessionComplete, SCPaymentProduct, SCPaymentPrice, SCPaymentsCustomerPortalSession, SCPurchasableContent } from '@selfcommunity/types';
5
5
  export interface PaymentApiClientInterface {
6
6
  /**
@@ -57,7 +57,7 @@ export interface PaymentApiClientInterface {
57
57
  * @param params
58
58
  * @param config
59
59
  */
60
- getPaymentsOrder(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
60
+ getPaymentsOrder(params?: PaymentOrderParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
61
61
  /**
62
62
  * This endpoint retrieve customer portal
63
63
  * @param data
@@ -123,7 +123,7 @@ export declare class PaymentApiClient {
123
123
  * @param params
124
124
  * @param config
125
125
  */
126
- static getPaymentsOrder(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
126
+ static getPaymentsOrder(params?: PaymentOrderParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
127
127
  /**
128
128
  * This endpoint retrive customer portal
129
129
  * @param data
@@ -175,6 +175,6 @@ export default class PaymentService {
175
175
  static checkoutCreateSession(data: CheckoutCreateSessionParams | FormData, config?: AxiosRequestConfig): Promise<SCCheckoutSession>;
176
176
  static getCheckoutSession(params?: CheckoutSessionParams, config?: AxiosRequestConfig): Promise<SCCheckoutSessionDetail>;
177
177
  static checkoutCompleteSession(data: CheckoutSessionParams | FormData, config?: AxiosRequestConfig): Promise<SCCheckoutSessionComplete>;
178
- static getPaymentsOrder(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
178
+ static getPaymentsOrder(params?: PaymentOrderParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
179
179
  static getPaymentsCustomerPortal(data: CustomerPortalCreateSessionParams | FormData, config?: AxiosRequestConfig): Promise<SCPaymentsCustomerPortalSession>;
180
180
  }
@@ -82,7 +82,8 @@ export class PaymentApiClient {
82
82
  * @param config
83
83
  */
84
84
  static getPaymentsOrder(params, config) {
85
- return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.GetPaymentOrders.url({}), method: Endpoints.GetPaymentOrders.method }));
85
+ const p = urlParams(params);
86
+ return apiRequest(Object.assign(Object.assign({}, config), { url: `${Endpoints.GetPaymentOrders.url({})}?${p.toString()}`, method: Endpoints.GetPaymentOrders.method }));
86
87
  }
87
88
  /**
88
89
  * This endpoint retrive customer portal
@@ -35,14 +35,14 @@ export interface CourseSectionParams {
35
35
  * CourseUserParams interface.
36
36
  */
37
37
  export interface CourseUserParams extends BaseGetParams {
38
- /**
39
- * Filter results by subscription_status
40
- */
41
- join_status?: SCCourseJoinStatusType;
42
38
  /**
43
39
  * Return only courses created by this user id
44
40
  */
45
41
  created_by?: number;
42
+ /**
43
+ * Filter by join_status; default: ["manager", "joined"]
44
+ */
45
+ statuses?: SCCourseJoinStatusType[] | SCCourseJoinStatusType;
46
46
  }
47
47
  /**
48
48
  * CourseSearchParams interface.
@@ -110,7 +110,7 @@ export interface CourseUsersParams extends BaseGetParams {
110
110
  * Filter by join_status; default: ["manager", "joined"].
111
111
  * Only creator, manager and joined are valid status for this route
112
112
  */
113
- statuses?: SCCourseJoinStatusType[];
113
+ statuses?: SCCourseJoinStatusType[] | SCCourseJoinStatusType;
114
114
  }
115
115
  /**
116
116
  * CourseDashboardUsersParams interface.
@@ -28,5 +28,5 @@ import { EventCreateParams, EventFeedParams, EventRelatedParams, EventSearchPara
28
28
  import { LiveStreamCreateParams, LiveStreamSearchParams, LiveStreamRemoveParticipantParams } from './liveStream';
29
29
  import { StartStepParams, OnBoardingStep } from './onBoarding';
30
30
  import { CourseCreateParams, CourseSearchParams, CourseInfoViewType, CourseInfoParams, CourseLessonCommentsParams, CourseUserRoleParams, CourseUsersParams, CourseDashboardUsersParams } from './course';
31
- import { PaymentContentStatusParams, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams } 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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams };
31
+ import { PaymentContentStatusParams, 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, PaymentProductsParams, CustomerPortalCreateSessionParams, CheckoutSessionParams, CheckoutCreateSessionParams, PaymentOrderParams };
@@ -1,4 +1,4 @@
1
- import { BaseGetParams } from './baseParams';
1
+ import { BaseGetParams, BaseSearchParams } from './baseParams';
2
2
  import { SCCheckoutSessionUIMode, SCContentType } from '@selfcommunity/types';
3
3
  /**
4
4
  * PaymentParams interface.
@@ -68,3 +68,12 @@ export interface PaymentContentStatusParams extends BaseGetParams {
68
68
  */
69
69
  content_type?: SCContentType;
70
70
  }
71
+ /**
72
+ * PaymentOrderParams interface.
73
+ */
74
+ export interface PaymentOrderParams extends BaseSearchParams {
75
+ /**
76
+ * Ordering
77
+ */
78
+ order_by?: string;
79
+ }