@selfcommunity/api-services 0.4.50-events.70 → 0.4.50-events.76

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.
@@ -61,6 +61,10 @@ const Endpoints = {
61
61
  url: (0, utils_1.urlReplacer)('/api/v2/dynamic_preference/$(id)/'),
62
62
  method: 'GET'
63
63
  },
64
+ UpdatePreferences: {
65
+ url: (0, utils_1.urlReplacer)('/api/v2/dynamic_preference/'),
66
+ method: 'PATCH'
67
+ },
64
68
  /**
65
69
  * SSO Endpoints
66
70
  */
@@ -1319,6 +1323,25 @@ const Endpoints = {
1319
1323
  HideEvent: {
1320
1324
  url: (0, utils_1.urlReplacer)('/api/v2/event/$(id)/hide/'),
1321
1325
  method: 'POST'
1326
+ },
1327
+ /**
1328
+ * OnBoarding
1329
+ */
1330
+ GetAllSteps: {
1331
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/'),
1332
+ method: 'GET'
1333
+ },
1334
+ GetAStep: {
1335
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/$(step)/'),
1336
+ method: 'GET'
1337
+ },
1338
+ StartAStep: {
1339
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/$(step)/start/'),
1340
+ method: 'POST'
1341
+ },
1342
+ CompleteAStep: {
1343
+ url: (0, utils_1.urlReplacer)('/api/v2/onboarding/$(step)/complete/'),
1344
+ method: 'POST'
1322
1345
  }
1323
1346
  };
1324
1347
  exports.default = Endpoints;
@@ -48,11 +48,12 @@ import WebhookService, { WebhookApiClient, WebhookApiClientInterface } from './s
48
48
  import ReactionService, { ReactionApiClient, ReactionApiClientInterface } from './services/reactions';
49
49
  import GroupService, { GroupApiClient, GroupApiClientInterface } from './services/group';
50
50
  import EventService, { EventApiClient, EventApiClientInterface } from './services/event';
51
+ import OnBoardingService, { OnBoardingApiClient, OnBoardingApiClientInterface } from './services/onboarding';
51
52
  /**
52
53
  * Types
53
54
  */
54
- import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventSearchParams } from './types';
55
+ import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventSearchParams, StartStepParams, OnBoardingStep } from './types';
55
56
  /**
56
57
  * Export all
57
58
  */
58
- export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountSearchParams, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface, GroupCreateParams, GroupFeedParams, GroupService, GroupApiClient, GroupApiClientInterface, EventCreateParams, EventFeedParams, EventSearchParams, EventService, EventApiClient, EventApiClientInterface };
59
+ export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountSearchParams, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface, GroupCreateParams, GroupFeedParams, GroupService, GroupApiClient, GroupApiClientInterface, EventCreateParams, EventFeedParams, EventSearchParams, EventService, EventApiClient, EventApiClientInterface, OnBoardingService, OnBoardingApiClientInterface, OnBoardingApiClient, StartStepParams, OnBoardingStep };
package/lib/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModerationService = exports.MediaApiClient = exports.MediaService = exports.LoyaltyApiClient = exports.LoyaltyService = exports.LocalityApiClient = exports.LocalityService = exports.LegalPageApiClient = exports.LegalPageService = exports.InviteApiClient = exports.InviteService = exports.InsightApiClient = exports.InsightService = exports.IncubatorApiClient = exports.IncubatorService = exports.FeedObjectApiClient = exports.FeedObjectService = exports.FeedApiClient = exports.FeedService = exports.EmbedApiClient = exports.EmbedService = exports.DataPortabilityApiClient = exports.DataPortabilityService = exports.CustomPageApiClient = exports.CustomPageService = exports.CustomMenuApiClient = exports.CustomMenuService = exports.CustomAdvApiClient = exports.CustomAdvService = exports.CommentApiClient = exports.CommentService = exports.CategoryApiClient = exports.CategoryService = exports.FeatureApiClient = exports.FeatureService = exports.UserApiClient = exports.UserService = exports.PreferenceApiClient = exports.PreferenceService = exports.AccountApiClient = exports.AccountService = exports.Endpoints = exports.urlParams = exports.parseJwt = exports.generateJWTToken = exports.getCancelTokenSourceRequest = exports.formatHttpErrorCode = exports.formatHttpError = exports.apiRequest = exports.http = void 0;
4
- exports.EventApiClient = exports.EventService = exports.GroupApiClient = exports.GroupService = exports.ReactionApiClient = exports.ReactionService = exports.MediaTypes = exports.WebhookApiClient = exports.WebhookService = exports.TagApiClient = exports.TagService = exports.SuggestionApiClient = exports.SuggestionService = exports.SSOApiClient = exports.SSOService = exports.ScoreApiClient = exports.ScoreService = exports.PromoApiClient = exports.PromoService = exports.PrivateMessageApiClient = exports.PrivateMessageService = exports.NotificationApiClient = exports.NotificationService = exports.ModerationApiClient = void 0;
4
+ exports.OnBoardingStep = exports.OnBoardingApiClient = exports.OnBoardingService = exports.EventApiClient = exports.EventService = exports.GroupApiClient = exports.GroupService = exports.ReactionApiClient = exports.ReactionService = exports.MediaTypes = exports.WebhookApiClient = exports.WebhookService = exports.TagApiClient = exports.TagService = exports.SuggestionApiClient = exports.SuggestionService = exports.SSOApiClient = exports.SSOService = exports.ScoreApiClient = exports.ScoreService = exports.PromoApiClient = exports.PromoService = exports.PrivateMessageApiClient = exports.PrivateMessageService = exports.NotificationApiClient = exports.NotificationService = exports.ModerationApiClient = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  /**
7
7
  * Axios client wrapper
@@ -126,8 +126,12 @@ Object.defineProperty(exports, "GroupApiClient", { enumerable: true, get: functi
126
126
  const event_1 = tslib_1.__importStar(require("./services/event"));
127
127
  exports.EventService = event_1.default;
128
128
  Object.defineProperty(exports, "EventApiClient", { enumerable: true, get: function () { return event_1.EventApiClient; } });
129
+ const onboarding_1 = tslib_1.__importStar(require("./services/onboarding"));
130
+ exports.OnBoardingService = onboarding_1.default;
131
+ Object.defineProperty(exports, "OnBoardingApiClient", { enumerable: true, get: function () { return onboarding_1.OnBoardingApiClient; } });
129
132
  /**
130
133
  * Types
131
134
  */
132
135
  const types_1 = require("./types");
133
136
  Object.defineProperty(exports, "MediaTypes", { enumerable: true, get: function () { return types_1.MediaTypes; } });
137
+ Object.defineProperty(exports, "OnBoardingStep", { enumerable: true, get: function () { return types_1.OnBoardingStep; } });
@@ -0,0 +1,80 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import { BaseSearchParams, OnBoardingStep, SCPaginatedResponse } from '../../types';
3
+ import { SCStepType } from '@selfcommunity/types';
4
+ import { StartStepParams } from '../../types/onBoarding';
5
+ export interface OnBoardingApiClientInterface {
6
+ getAllSteps(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
7
+ getAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
8
+ startAStep(step: OnBoardingStep, params?: StartStepParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
9
+ completeAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
10
+ }
11
+ /**
12
+ * Contains all the endpoints needed to manage OnBoarding content.
13
+ */
14
+ export declare class OnBoardingApiClient {
15
+ /**
16
+ * This endpoint retrieves all onboarding steps.
17
+ * @param params
18
+ * @param config
19
+ */
20
+ static getAllSteps(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
21
+ /**
22
+ * This endpoint retrieves a specific step identified by the step id.
23
+ * @param step
24
+ * @param config
25
+ */
26
+ static getAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<SCStepType>;
27
+ /**
28
+ * This endpoint performs step content generation.
29
+ * @param step
30
+ * @param params
31
+ * @param config
32
+ */
33
+ static startAStep(step: OnBoardingStep, params?: StartStepParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
34
+ /**
35
+ * This endpoint marks a step complete.
36
+ * @param step
37
+ * @param config
38
+ */
39
+ static completeAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
40
+ }
41
+ /**
42
+ *
43
+ :::tip OnBoarding service can be used in the following way:
44
+ ```jsx
45
+ 1. Import the service from our library:
46
+
47
+ import {OnBoardingService} from "@selfcommunity/api-services";
48
+ ```
49
+ ```jsx
50
+ 2. Create a function and put the service inside it!
51
+ The async function `getAStep` will return the paginated list of categories.
52
+
53
+ async getAStep() {
54
+ return await OnBoardingService.getAStep();
55
+ }
56
+ ```
57
+ ```jsx
58
+ In case of required `params`, just add them inside the brackets.
59
+
60
+ async create(data) {
61
+ return await OnBoardingService.getAStep(step);
62
+ }
63
+ ```
64
+ ```jsx
65
+ If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
66
+
67
+ 1. Declare it(or declare them, it is possible to add multiple params)
68
+
69
+ const headers = headers: {Authorization: `Bearer ${yourToken}`}
70
+
71
+ 2. Add it inside the brackets and pass it to the function, as shown in the previous example!
72
+ ```
73
+ :::
74
+ */
75
+ export default class OnBoardingService {
76
+ static getAllSteps(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
77
+ static getAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<SCStepType>;
78
+ static startAStep(step: OnBoardingStep, params?: StartStepParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
79
+ static completeAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
80
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OnBoardingApiClient = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const Endpoints_1 = tslib_1.__importDefault(require("../../constants/Endpoints"));
6
+ const apiRequest_1 = require("../../utils/apiRequest");
7
+ /**
8
+ * Contains all the endpoints needed to manage OnBoarding content.
9
+ */
10
+ class OnBoardingApiClient {
11
+ /**
12
+ * This endpoint retrieves all onboarding steps.
13
+ * @param params
14
+ * @param config
15
+ */
16
+ static getAllSteps(params, config) {
17
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { params, url: Endpoints_1.default.GetAllSteps.url({}), method: Endpoints_1.default.GetAllSteps.method }));
18
+ }
19
+ /**
20
+ * This endpoint retrieves a specific step identified by the step id.
21
+ * @param step
22
+ * @param config
23
+ */
24
+ static getAStep(step, config) {
25
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.GetAStep.url({ step }), method: Endpoints_1.default.GetAStep.method }));
26
+ }
27
+ /**
28
+ * This endpoint performs step content generation.
29
+ * @param step
30
+ * @param params
31
+ * @param config
32
+ */
33
+ static startAStep(step, params, config) {
34
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { params, url: Endpoints_1.default.StartAStep.url({ step }), method: Endpoints_1.default.StartAStep.method }));
35
+ }
36
+ /**
37
+ * This endpoint marks a step complete.
38
+ * @param step
39
+ * @param config
40
+ */
41
+ static completeAStep(step, config) {
42
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.CompleteAStep.url({ step }), method: Endpoints_1.default.CompleteAStep.method }));
43
+ }
44
+ }
45
+ exports.OnBoardingApiClient = OnBoardingApiClient;
46
+ /**
47
+ *
48
+ :::tip OnBoarding service can be used in the following way:
49
+ ```jsx
50
+ 1. Import the service from our library:
51
+
52
+ import {OnBoardingService} from "@selfcommunity/api-services";
53
+ ```
54
+ ```jsx
55
+ 2. Create a function and put the service inside it!
56
+ The async function `getAStep` will return the paginated list of categories.
57
+
58
+ async getAStep() {
59
+ return await OnBoardingService.getAStep();
60
+ }
61
+ ```
62
+ ```jsx
63
+ In case of required `params`, just add them inside the brackets.
64
+
65
+ async create(data) {
66
+ return await OnBoardingService.getAStep(step);
67
+ }
68
+ ```
69
+ ```jsx
70
+ If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
71
+
72
+ 1. Declare it(or declare them, it is possible to add multiple params)
73
+
74
+ const headers = headers: {Authorization: `Bearer ${yourToken}`}
75
+
76
+ 2. Add it inside the brackets and pass it to the function, as shown in the previous example!
77
+ ```
78
+ :::
79
+ */
80
+ class OnBoardingService {
81
+ static getAllSteps(params, config) {
82
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
83
+ return OnBoardingApiClient.getAllSteps(params, config);
84
+ });
85
+ }
86
+ static getAStep(step, config) {
87
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
88
+ return OnBoardingApiClient.getAStep(step, config);
89
+ });
90
+ }
91
+ static startAStep(step, params, config) {
92
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
93
+ return OnBoardingApiClient.startAStep(step, params, config);
94
+ });
95
+ }
96
+ static completeAStep(step, config) {
97
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
98
+ return OnBoardingApiClient.completeAStep(step, config);
99
+ });
100
+ }
101
+ }
102
+ exports.default = OnBoardingService;
@@ -5,6 +5,7 @@ export interface PreferenceApiClientInterface {
5
5
  getAllPreferences(config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPreferenceType>>;
6
6
  searchPreferences(search?: string, section?: string, keys?: string, ordering?: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPreferenceType>>;
7
7
  getSpecificPreference(id: number | string, config?: AxiosRequestConfig): Promise<SCPreferenceType>;
8
+ updatePreferences(data: any, config?: AxiosRequestConfig): Promise<SCPreferenceType | SCPreferenceType[]>;
8
9
  }
9
10
  /**
10
11
  * Contains all the endpoints needed to manage dynamic preferences.
@@ -30,6 +31,12 @@ export declare class PreferenceApiClient {
30
31
  * @param config
31
32
  */
32
33
  static getSpecificPreference(id: number | string, config?: AxiosRequestConfig): Promise<SCPreferenceType>;
34
+ /**
35
+ * This endpoint patches one or more dynamic preferences.
36
+ * @param data
37
+ * @param config
38
+ */
39
+ static updatePreferences(data: any, config?: AxiosRequestConfig): Promise<SCPreferenceType | SCPreferenceType[]>;
33
40
  }
34
41
  /**
35
42
  *
@@ -70,4 +77,5 @@ export default class PreferenceService {
70
77
  static getAllPreferences(config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPreferenceType>>;
71
78
  static searchPreferences(search?: string, section?: string, keys?: string, ordering?: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPreferenceType>>;
72
79
  static getSpecificPreference(id: number | string, config?: AxiosRequestConfig): Promise<SCPreferenceType>;
80
+ static updatePreferences(data: any, config?: AxiosRequestConfig): Promise<SCPreferenceType | SCPreferenceType[]>;
73
81
  }
@@ -36,6 +36,14 @@ class PreferenceApiClient {
36
36
  static getSpecificPreference(id, config) {
37
37
  return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.GetPreference.url({ id }), method: Endpoints_1.default.Preferences.method }));
38
38
  }
39
+ /**
40
+ * This endpoint patches one or more dynamic preferences.
41
+ * @param data
42
+ * @param config
43
+ */
44
+ static updatePreferences(data, config) {
45
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.UpdatePreferences.url(), method: Endpoints_1.default.UpdatePreferences.method, data: data }));
46
+ }
39
47
  }
40
48
  exports.PreferenceApiClient = PreferenceApiClient;
41
49
  /**
@@ -89,5 +97,10 @@ class PreferenceService {
89
97
  return PreferenceApiClient.getSpecificPreference(id, config);
90
98
  });
91
99
  }
100
+ static updatePreferences(data, config) {
101
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
102
+ return PreferenceApiClient.updatePreferences(data, config);
103
+ });
104
+ }
92
105
  }
93
106
  exports.default = PreferenceService;
@@ -25,4 +25,5 @@ import { InsightCommonParams, InsightEmbedParams, InsightUserParams, InsightCont
25
25
  import { ReactionParams } from './reaction';
26
26
  import { GroupCreateParams, GroupFeedParams } from './group';
27
27
  import { EventCreateParams, EventFeedParams, EventRelatedParams, EventSearchParams } from './event';
28
- 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 };
28
+ import { StartStepParams, OnBoardingStep } from './onBoarding';
29
+ 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, StartStepParams, OnBoardingStep };
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MediaTypes = void 0;
3
+ exports.OnBoardingStep = exports.MediaTypes = void 0;
4
4
  const media_1 = require("./media");
5
5
  Object.defineProperty(exports, "MediaTypes", { enumerable: true, get: function () { return media_1.MediaTypes; } });
6
+ const onBoarding_1 = require("./onBoarding");
7
+ Object.defineProperty(exports, "OnBoardingStep", { enumerable: true, get: function () { return onBoarding_1.OnBoardingStep; } });
@@ -0,0 +1,30 @@
1
+ /**
2
+ * StartStepParams interface
3
+ */
4
+ export interface StartStepParams {
5
+ /**
6
+ * The number of the post to generate.
7
+ * @default 10
8
+ */
9
+ num_posts?: number;
10
+ /**
11
+ * The number of the post images to generate
12
+ * @default 1
13
+ */
14
+ num_images?: number;
15
+ /**
16
+ * only for stage
17
+ */
18
+ force?: number;
19
+ }
20
+ /**
21
+ * OnBoardingStepType enum
22
+ */
23
+ export declare enum OnBoardingStep {
24
+ CONTENTS = 1,
25
+ CATEGORIES = 2,
26
+ APPEARANCE = 3,
27
+ PROFILE = 4,
28
+ INVITE = 5,
29
+ APP = 6
30
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * StartStepParams interface
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OnBoardingStep = void 0;
7
+ /**
8
+ * OnBoardingStepType enum
9
+ */
10
+ var OnBoardingStep;
11
+ (function (OnBoardingStep) {
12
+ OnBoardingStep[OnBoardingStep["CONTENTS"] = 1] = "CONTENTS";
13
+ OnBoardingStep[OnBoardingStep["CATEGORIES"] = 2] = "CATEGORIES";
14
+ OnBoardingStep[OnBoardingStep["APPEARANCE"] = 3] = "APPEARANCE";
15
+ OnBoardingStep[OnBoardingStep["PROFILE"] = 4] = "PROFILE";
16
+ OnBoardingStep[OnBoardingStep["INVITE"] = 5] = "INVITE";
17
+ OnBoardingStep[OnBoardingStep["APP"] = 6] = "APP";
18
+ })(OnBoardingStep = exports.OnBoardingStep || (exports.OnBoardingStep = {}));
@@ -59,6 +59,10 @@ const Endpoints = {
59
59
  url: urlReplacer('/api/v2/dynamic_preference/$(id)/'),
60
60
  method: 'GET'
61
61
  },
62
+ UpdatePreferences: {
63
+ url: urlReplacer('/api/v2/dynamic_preference/'),
64
+ method: 'PATCH'
65
+ },
62
66
  /**
63
67
  * SSO Endpoints
64
68
  */
@@ -1317,6 +1321,25 @@ const Endpoints = {
1317
1321
  HideEvent: {
1318
1322
  url: urlReplacer('/api/v2/event/$(id)/hide/'),
1319
1323
  method: 'POST'
1324
+ },
1325
+ /**
1326
+ * OnBoarding
1327
+ */
1328
+ GetAllSteps: {
1329
+ url: urlReplacer('/api/v2/onboarding/'),
1330
+ method: 'GET'
1331
+ },
1332
+ GetAStep: {
1333
+ url: urlReplacer('/api/v2/onboarding/$(step)/'),
1334
+ method: 'GET'
1335
+ },
1336
+ StartAStep: {
1337
+ url: urlReplacer('/api/v2/onboarding/$(step)/start/'),
1338
+ method: 'POST'
1339
+ },
1340
+ CompleteAStep: {
1341
+ url: urlReplacer('/api/v2/onboarding/$(step)/complete/'),
1342
+ method: 'POST'
1320
1343
  }
1321
1344
  };
1322
1345
  export default Endpoints;
@@ -48,11 +48,12 @@ import WebhookService, { WebhookApiClient, WebhookApiClientInterface } from './s
48
48
  import ReactionService, { ReactionApiClient, ReactionApiClientInterface } from './services/reactions';
49
49
  import GroupService, { GroupApiClient, GroupApiClientInterface } from './services/group';
50
50
  import EventService, { EventApiClient, EventApiClientInterface } from './services/event';
51
+ import OnBoardingService, { OnBoardingApiClient, OnBoardingApiClientInterface } from './services/onboarding';
51
52
  /**
52
53
  * Types
53
54
  */
54
- import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventSearchParams } from './types';
55
+ import { AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, AccountSearchParams, SCPaginatedResponse, WebhookParamType, WebhookEventsType, SSOSignUpParams, CommentListParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, ModerateContributionParams, FlaggedContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, GroupCreateParams, GroupFeedParams, EventCreateParams, EventFeedParams, EventSearchParams, StartStepParams, OnBoardingStep } from './types';
55
56
  /**
56
57
  * Export all
57
58
  */
58
- export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountSearchParams, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface, GroupCreateParams, GroupFeedParams, GroupService, GroupApiClient, GroupApiClientInterface, EventCreateParams, EventFeedParams, EventSearchParams, EventService, EventApiClient, EventApiClientInterface };
59
+ export { http, HttpResponse, HttpMethod, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, EndpointType, AccountService, AccountApiClient, AccountApiClientInterface, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomMenuService, CustomMenuApiClient, CustomMenuApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, InviteService, InviteApiClient, InviteApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, PromoService, PromoApiClient, PromoApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface, SCPaginatedResponse, WebhookParamType, WebhookEventsType, AccountSearchParams, AccountCreateParams, AccountVerifyParams, AccountResetParams, AccountRecoverParams, CommentCreateParams, IncubatorCreateParams, IncubatorSearchParams, SSOSignUpParams, CommentListParams, LoyaltyPrizeParams, LoyaltyGetPrizeParams, ModerationParams, FlaggedContributionParams, ModerateContributionParams, CustomNotificationParams, UserAutocompleteParams, UserScoreParams, UserSearchParams, TagParams, TagGetParams, MediaCreateParams, MediaTypes, ChunkUploadParams, ChunkUploadCompleteParams, ThreadParams, MessageCreateParams, MessageMediaUploadParams, MessageThumbnailUploadParams, MessageChunkUploadDoneParams, MessageMediaChunksParams, CategoryParams, CustomAdvParams, CustomPageParams, CustomPageSearchParams, EmbedUpdateParams, EmbedSearchParams, BaseGetParams, BaseSearchParams, FeedObjGetParams, FeedObjCreateParams, FeedObjectPollVotesSearch, FeedParams, LegalPageFilterParams, FeatureParams, ScoreParams, InsightContributionParams, InsightUserParams, InsightEmbedParams, InsightCommonParams, ReactionParams, ReactionService, ReactionApiClient, ReactionApiClientInterface, GroupCreateParams, GroupFeedParams, GroupService, GroupApiClient, GroupApiClientInterface, EventCreateParams, EventFeedParams, EventSearchParams, EventService, EventApiClient, EventApiClientInterface, OnBoardingService, OnBoardingApiClientInterface, OnBoardingApiClient, StartStepParams, OnBoardingStep };
package/lib/esm/index.js CHANGED
@@ -48,11 +48,12 @@ import WebhookService, { WebhookApiClient } from './services/webhook';
48
48
  import ReactionService, { ReactionApiClient } from './services/reactions';
49
49
  import GroupService, { GroupApiClient } from './services/group';
50
50
  import EventService, { EventApiClient } from './services/event';
51
+ import OnBoardingService, { OnBoardingApiClient } from './services/onboarding';
51
52
  /**
52
53
  * Types
53
54
  */
54
- import { MediaTypes } from './types';
55
+ import { MediaTypes, OnBoardingStep } from './types';
55
56
  /**
56
57
  * Export all
57
58
  */
58
- export { http, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, AccountService, AccountApiClient, PreferenceService, PreferenceApiClient, UserService, UserApiClient, FeatureService, FeatureApiClient, CategoryService, CategoryApiClient, CommentService, CommentApiClient, CustomAdvService, CustomAdvApiClient, CustomMenuService, CustomMenuApiClient, CustomPageService, CustomPageApiClient, DataPortabilityService, DataPortabilityApiClient, EmbedService, EmbedApiClient, FeedService, FeedApiClient, FeedObjectService, FeedObjectApiClient, IncubatorService, IncubatorApiClient, InsightService, InsightApiClient, InviteService, InviteApiClient, LegalPageService, LegalPageApiClient, LocalityService, LocalityApiClient, LoyaltyService, LoyaltyApiClient, MediaService, MediaApiClient, ModerationService, ModerationApiClient, NotificationService, NotificationApiClient, PrivateMessageService, PrivateMessageApiClient, PromoService, PromoApiClient, ScoreService, ScoreApiClient, SSOService, SSOApiClient, SuggestionService, SuggestionApiClient, TagService, TagApiClient, WebhookService, WebhookApiClient, MediaTypes, ReactionService, ReactionApiClient, GroupService, GroupApiClient, EventService, EventApiClient };
59
+ export { http, apiRequest, formatHttpError, formatHttpErrorCode, getCancelTokenSourceRequest, generateJWTToken, parseJwt, urlParams, Endpoints, AccountService, AccountApiClient, PreferenceService, PreferenceApiClient, UserService, UserApiClient, FeatureService, FeatureApiClient, CategoryService, CategoryApiClient, CommentService, CommentApiClient, CustomAdvService, CustomAdvApiClient, CustomMenuService, CustomMenuApiClient, CustomPageService, CustomPageApiClient, DataPortabilityService, DataPortabilityApiClient, EmbedService, EmbedApiClient, FeedService, FeedApiClient, FeedObjectService, FeedObjectApiClient, IncubatorService, IncubatorApiClient, InsightService, InsightApiClient, InviteService, InviteApiClient, LegalPageService, LegalPageApiClient, LocalityService, LocalityApiClient, LoyaltyService, LoyaltyApiClient, MediaService, MediaApiClient, ModerationService, ModerationApiClient, NotificationService, NotificationApiClient, PrivateMessageService, PrivateMessageApiClient, PromoService, PromoApiClient, ScoreService, ScoreApiClient, SSOService, SSOApiClient, SuggestionService, SuggestionApiClient, TagService, TagApiClient, WebhookService, WebhookApiClient, MediaTypes, ReactionService, ReactionApiClient, GroupService, GroupApiClient, EventService, EventApiClient, OnBoardingService, OnBoardingApiClient, OnBoardingStep };
@@ -0,0 +1,80 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import { BaseSearchParams, OnBoardingStep, SCPaginatedResponse } from '../../types';
3
+ import { SCStepType } from '@selfcommunity/types';
4
+ import { StartStepParams } from '../../types/onBoarding';
5
+ export interface OnBoardingApiClientInterface {
6
+ getAllSteps(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
7
+ getAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
8
+ startAStep(step: OnBoardingStep, params?: StartStepParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
9
+ completeAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
10
+ }
11
+ /**
12
+ * Contains all the endpoints needed to manage OnBoarding content.
13
+ */
14
+ export declare class OnBoardingApiClient {
15
+ /**
16
+ * This endpoint retrieves all onboarding steps.
17
+ * @param params
18
+ * @param config
19
+ */
20
+ static getAllSteps(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
21
+ /**
22
+ * This endpoint retrieves a specific step identified by the step id.
23
+ * @param step
24
+ * @param config
25
+ */
26
+ static getAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<SCStepType>;
27
+ /**
28
+ * This endpoint performs step content generation.
29
+ * @param step
30
+ * @param params
31
+ * @param config
32
+ */
33
+ static startAStep(step: OnBoardingStep, params?: StartStepParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
34
+ /**
35
+ * This endpoint marks a step complete.
36
+ * @param step
37
+ * @param config
38
+ */
39
+ static completeAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
40
+ }
41
+ /**
42
+ *
43
+ :::tip OnBoarding service can be used in the following way:
44
+ ```jsx
45
+ 1. Import the service from our library:
46
+
47
+ import {OnBoardingService} from "@selfcommunity/api-services";
48
+ ```
49
+ ```jsx
50
+ 2. Create a function and put the service inside it!
51
+ The async function `getAStep` will return the paginated list of categories.
52
+
53
+ async getAStep() {
54
+ return await OnBoardingService.getAStep();
55
+ }
56
+ ```
57
+ ```jsx
58
+ In case of required `params`, just add them inside the brackets.
59
+
60
+ async create(data) {
61
+ return await OnBoardingService.getAStep(step);
62
+ }
63
+ ```
64
+ ```jsx
65
+ If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
66
+
67
+ 1. Declare it(or declare them, it is possible to add multiple params)
68
+
69
+ const headers = headers: {Authorization: `Bearer ${yourToken}`}
70
+
71
+ 2. Add it inside the brackets and pass it to the function, as shown in the previous example!
72
+ ```
73
+ :::
74
+ */
75
+ export default class OnBoardingService {
76
+ static getAllSteps(params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
77
+ static getAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<SCStepType>;
78
+ static startAStep(step: OnBoardingStep, params?: StartStepParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCStepType>>;
79
+ static completeAStep(step: OnBoardingStep, config?: AxiosRequestConfig): Promise<any>;
80
+ }