@abyss-project/main 1.0.45 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/enum/onboarding-steps.enum.d.ts +15 -0
- package/dist/types/enum/onboarding-steps.enum.js +19 -0
- package/dist/types/enum/subscription-level.enum.d.ts +1 -0
- package/dist/types/enum/subscription-level.enum.js +3 -0
- package/dist/types/enum/user-type.enum.d.ts +4 -0
- package/dist/types/enum/user-type.enum.js +8 -0
- package/dist/types/interface/api/requests/user.request.d.ts +2 -0
- package/dist/types/interface/models/user.model.d.ts +9 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.js +1 -0
- package/dist/types/utils/onboarding.utils.d.ts +34 -0
- package/dist/types/utils/onboarding.utils.js +51 -0
- package/package.json +1 -1
package/dist/types/enum/index.js
CHANGED
|
@@ -34,3 +34,5 @@ __exportStar(require("./subscription-level.enum"), exports);
|
|
|
34
34
|
__exportStar(require("./newsletter-type.enum"), exports);
|
|
35
35
|
__exportStar(require("./project-status.enum"), exports);
|
|
36
36
|
__exportStar(require("./abyss-application-event.enum"), exports);
|
|
37
|
+
__exportStar(require("./user-type.enum"), exports);
|
|
38
|
+
__exportStar(require("./onboarding-steps.enum"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum OnboardingSteps {
|
|
2
|
+
LANDING = "LANDING",
|
|
3
|
+
USER_DETAILS = "USER_DETAILS",
|
|
4
|
+
USER_TYPE = "USER_TYPE",
|
|
5
|
+
DEVELOPER_CREATE_PROJECT = "DEVELOPER_CREATE_PROJECT",
|
|
6
|
+
DEVELOPER_DISCOVER_MONITOR = "DEVELOPER_DISCOVER_MONITOR",
|
|
7
|
+
DEVELOPER_DISCOVER_STORAGE = "DEVELOPER_DISCOVER_STORAGE",
|
|
8
|
+
USER_FEATURE_SELECT = "USER_FEATURE_SELECT",
|
|
9
|
+
USER_CREATE_CLOUD = "USER_CREATE_CLOUD",
|
|
10
|
+
USER_CONNECT_BANK = "USER_CONNECT_BANK",
|
|
11
|
+
USER_CREATE_MEMORIES = "USER_CREATE_MEMORIES",
|
|
12
|
+
USER_CREATE_FORM = "USER_CREATE_FORM",
|
|
13
|
+
USER_CREATE_SPOTLIGHT = "USER_CREATE_SPOTLIGHT",
|
|
14
|
+
END = "END"
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnboardingSteps = void 0;
|
|
4
|
+
var OnboardingSteps;
|
|
5
|
+
(function (OnboardingSteps) {
|
|
6
|
+
OnboardingSteps["LANDING"] = "LANDING";
|
|
7
|
+
OnboardingSteps["USER_DETAILS"] = "USER_DETAILS";
|
|
8
|
+
OnboardingSteps["USER_TYPE"] = "USER_TYPE";
|
|
9
|
+
OnboardingSteps["DEVELOPER_CREATE_PROJECT"] = "DEVELOPER_CREATE_PROJECT";
|
|
10
|
+
OnboardingSteps["DEVELOPER_DISCOVER_MONITOR"] = "DEVELOPER_DISCOVER_MONITOR";
|
|
11
|
+
OnboardingSteps["DEVELOPER_DISCOVER_STORAGE"] = "DEVELOPER_DISCOVER_STORAGE";
|
|
12
|
+
OnboardingSteps["USER_FEATURE_SELECT"] = "USER_FEATURE_SELECT";
|
|
13
|
+
OnboardingSteps["USER_CREATE_CLOUD"] = "USER_CREATE_CLOUD";
|
|
14
|
+
OnboardingSteps["USER_CONNECT_BANK"] = "USER_CONNECT_BANK";
|
|
15
|
+
OnboardingSteps["USER_CREATE_MEMORIES"] = "USER_CREATE_MEMORIES";
|
|
16
|
+
OnboardingSteps["USER_CREATE_FORM"] = "USER_CREATE_FORM";
|
|
17
|
+
OnboardingSteps["USER_CREATE_SPOTLIGHT"] = "USER_CREATE_SPOTLIGHT";
|
|
18
|
+
OnboardingSteps["END"] = "END";
|
|
19
|
+
})(OnboardingSteps || (exports.OnboardingSteps = OnboardingSteps = {}));
|
|
@@ -113,6 +113,7 @@ exports.PROJECT_SUBSCRIPTION_CONFIG = {
|
|
|
113
113
|
statsHistoryDays: 3,
|
|
114
114
|
maxStoreEntry: 10,
|
|
115
115
|
eventPublishLimitPerDay: 100,
|
|
116
|
+
maxSentinelCountPerProject: 5,
|
|
116
117
|
},
|
|
117
118
|
ABYSS_FORM: {
|
|
118
119
|
maxDocumentPerForm: 10,
|
|
@@ -137,6 +138,7 @@ exports.PROJECT_SUBSCRIPTION_CONFIG = {
|
|
|
137
138
|
statsHistoryDays: 7,
|
|
138
139
|
maxStoreEntry: 100,
|
|
139
140
|
eventPublishLimitPerDay: 1000,
|
|
141
|
+
maxSentinelCountPerProject: 30,
|
|
140
142
|
},
|
|
141
143
|
ABYSS_FORM: {
|
|
142
144
|
maxDocumentPerForm: 50,
|
|
@@ -161,6 +163,7 @@ exports.PROJECT_SUBSCRIPTION_CONFIG = {
|
|
|
161
163
|
statsHistoryDays: Infinity,
|
|
162
164
|
maxStoreEntry: 500,
|
|
163
165
|
eventPublishLimitPerDay: 10000,
|
|
166
|
+
maxSentinelCountPerProject: 100,
|
|
164
167
|
},
|
|
165
168
|
ABYSS_FORM: {
|
|
166
169
|
maxDocumentPerForm: 100,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserType = void 0;
|
|
4
|
+
var UserType;
|
|
5
|
+
(function (UserType) {
|
|
6
|
+
UserType["DEVELOPER"] = "DEVELOPER";
|
|
7
|
+
UserType["USER"] = "USER";
|
|
8
|
+
})(UserType || (exports.UserType = UserType = {}));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SubscriptionLevel, UserCreditPurchaseCurrency, UserLanguage } from '../../../enum';
|
|
2
2
|
import { TokenHistoryMetadataUserInvitation } from '../../models/token-history.model';
|
|
3
|
+
import { UserOnboardingStatus } from '../../models/user.model';
|
|
3
4
|
import { QueryPaginate } from '../type-message/base-paginate';
|
|
4
5
|
import * as core from 'express-serve-static-core';
|
|
5
6
|
export interface ISponsorUserQuery {
|
|
@@ -26,6 +27,7 @@ export type IPaginateSponsorUserQuery = {
|
|
|
26
27
|
export interface IUpdateSettingsUserBody {
|
|
27
28
|
language?: UserLanguage;
|
|
28
29
|
currency?: UserCreditPurchaseCurrency;
|
|
30
|
+
onboardingStatus?: UserOnboardingStatus;
|
|
29
31
|
}
|
|
30
32
|
export interface ICreateSubscriptionUserBody {
|
|
31
33
|
level: SubscriptionLevel;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { IGiftCodeActivation, IOAuthAccount, IProject, IUserTransaction } from '..';
|
|
2
|
-
import { AbyssService, UserCreditPurchaseCurrency, UserLanguage } from '../../enum';
|
|
2
|
+
import { AbyssService, OnboardingSteps, UserCreditPurchaseCurrency, UserLanguage, UserType } from '../../enum';
|
|
3
|
+
import { OnboardingData } from '../../utils';
|
|
3
4
|
import { ISubscription } from './subscription.model';
|
|
4
5
|
import { IUserNotification } from './user-notification.model';
|
|
5
6
|
export interface IUserSetting {
|
|
6
7
|
language?: UserLanguage;
|
|
7
8
|
currency?: UserCreditPurchaseCurrency | null;
|
|
9
|
+
onboardingStatus?: UserOnboardingStatus | null;
|
|
10
|
+
userType?: UserType;
|
|
8
11
|
}
|
|
9
12
|
export interface IUser {
|
|
10
13
|
id?: string;
|
|
@@ -35,3 +38,8 @@ export interface IUser {
|
|
|
35
38
|
subscription?: ISubscription | null;
|
|
36
39
|
project?: IProject[];
|
|
37
40
|
}
|
|
41
|
+
export type UserOnboardingStatus = {
|
|
42
|
+
completedAt?: Date | null;
|
|
43
|
+
step?: OnboardingSteps | null;
|
|
44
|
+
data?: OnboardingData | null;
|
|
45
|
+
};
|
|
@@ -20,3 +20,4 @@ __exportStar(require("./convert-query.util"), exports);
|
|
|
20
20
|
__exportStar(require("./notifications.type-util"), exports);
|
|
21
21
|
__exportStar(require("./billing.util"), exports);
|
|
22
22
|
__exportStar(require("./email.utils"), exports);
|
|
23
|
+
__exportStar(require("./onboarding.utils"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OnboardingSteps, UserType } from '../enum';
|
|
2
|
+
export declare const ABYSS_MEMORIES_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=abyss.project.memories&pcampaignid=web_share";
|
|
3
|
+
export declare const ABYSS_CLOUD_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=abyss.project.cloud&pcampaignid=web_share";
|
|
4
|
+
export declare const ABYSS_MEMORIES_APPLE_STORE_URL = "https://apps.apple.com/fr/app/abyss-memories/id6505037238";
|
|
5
|
+
export declare const ABYSS_CLOUD_APPLE_STORE_URL = "https://apps.apple.com/fr/app/abyss-cloud/id6636511562";
|
|
6
|
+
export declare const COMMONS_STEPS: OnboardingSteps[];
|
|
7
|
+
export type OnboardingData = {
|
|
8
|
+
userDetails: {
|
|
9
|
+
name: string;
|
|
10
|
+
familyName: string;
|
|
11
|
+
email: string;
|
|
12
|
+
signupAsCompany: boolean;
|
|
13
|
+
companyName?: string;
|
|
14
|
+
companyRole?: string;
|
|
15
|
+
companyWebsite?: string;
|
|
16
|
+
};
|
|
17
|
+
userType: {
|
|
18
|
+
type: UserType | null;
|
|
19
|
+
};
|
|
20
|
+
userFeatures: {
|
|
21
|
+
cloud: boolean;
|
|
22
|
+
banking: boolean;
|
|
23
|
+
memories: boolean;
|
|
24
|
+
form: boolean;
|
|
25
|
+
spotlight: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const getOnboardingProgression: (currentStep: OnboardingSteps, onboardingData: OnboardingData) => {
|
|
29
|
+
nextStep: OnboardingSteps;
|
|
30
|
+
steps: OnboardingSteps[];
|
|
31
|
+
progression: number;
|
|
32
|
+
stepIndex: number;
|
|
33
|
+
isLastStep: boolean;
|
|
34
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOnboardingProgression = exports.COMMONS_STEPS = exports.ABYSS_CLOUD_APPLE_STORE_URL = exports.ABYSS_MEMORIES_APPLE_STORE_URL = exports.ABYSS_CLOUD_PLAY_STORE_URL = exports.ABYSS_MEMORIES_PLAY_STORE_URL = void 0;
|
|
4
|
+
const enum_1 = require("../enum");
|
|
5
|
+
exports.ABYSS_MEMORIES_PLAY_STORE_URL = 'https://play.google.com/store/apps/details?id=abyss.project.memories&pcampaignid=web_share';
|
|
6
|
+
exports.ABYSS_CLOUD_PLAY_STORE_URL = 'https://play.google.com/store/apps/details?id=abyss.project.cloud&pcampaignid=web_share';
|
|
7
|
+
exports.ABYSS_MEMORIES_APPLE_STORE_URL = 'https://apps.apple.com/fr/app/abyss-memories/id6505037238';
|
|
8
|
+
exports.ABYSS_CLOUD_APPLE_STORE_URL = 'https://apps.apple.com/fr/app/abyss-cloud/id6636511562';
|
|
9
|
+
exports.COMMONS_STEPS = [
|
|
10
|
+
enum_1.OnboardingSteps.LANDING,
|
|
11
|
+
enum_1.OnboardingSteps.USER_DETAILS,
|
|
12
|
+
enum_1.OnboardingSteps.USER_TYPE,
|
|
13
|
+
];
|
|
14
|
+
const getOnboardingProgression = (currentStep, onboardingData) => {
|
|
15
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
16
|
+
const allSteps = [
|
|
17
|
+
...exports.COMMONS_STEPS,
|
|
18
|
+
...(((_a = onboardingData.userType) === null || _a === void 0 ? void 0 : _a.type) === enum_1.UserType.DEVELOPER
|
|
19
|
+
? [
|
|
20
|
+
enum_1.OnboardingSteps.DEVELOPER_CREATE_PROJECT,
|
|
21
|
+
enum_1.OnboardingSteps.DEVELOPER_DISCOVER_MONITOR,
|
|
22
|
+
enum_1.OnboardingSteps.DEVELOPER_DISCOVER_STORAGE,
|
|
23
|
+
]
|
|
24
|
+
: []),
|
|
25
|
+
...(((_b = onboardingData.userType) === null || _b === void 0 ? void 0 : _b.type) === enum_1.UserType.USER
|
|
26
|
+
? [enum_1.OnboardingSteps.USER_FEATURE_SELECT]
|
|
27
|
+
: []),
|
|
28
|
+
...(((_c = onboardingData.userType) === null || _c === void 0 ? void 0 : _c.type) === enum_1.UserType.USER
|
|
29
|
+
? [
|
|
30
|
+
...(((_d = onboardingData.userFeatures) === null || _d === void 0 ? void 0 : _d.cloud) ? [enum_1.OnboardingSteps.USER_CREATE_CLOUD] : []),
|
|
31
|
+
...(((_e = onboardingData.userFeatures) === null || _e === void 0 ? void 0 : _e.banking) ? [enum_1.OnboardingSteps.USER_CONNECT_BANK] : []),
|
|
32
|
+
...(((_f = onboardingData.userFeatures) === null || _f === void 0 ? void 0 : _f.memories) ? [enum_1.OnboardingSteps.USER_CREATE_MEMORIES] : []),
|
|
33
|
+
...(((_g = onboardingData.userFeatures) === null || _g === void 0 ? void 0 : _g.form) ? [enum_1.OnboardingSteps.USER_CREATE_FORM] : []),
|
|
34
|
+
...(((_h = onboardingData.userFeatures) === null || _h === void 0 ? void 0 : _h.spotlight)
|
|
35
|
+
? [enum_1.OnboardingSteps.USER_CREATE_SPOTLIGHT]
|
|
36
|
+
: []),
|
|
37
|
+
]
|
|
38
|
+
: []),
|
|
39
|
+
enum_1.OnboardingSteps.END,
|
|
40
|
+
];
|
|
41
|
+
const isLastStep = currentStep === allSteps.at(-1);
|
|
42
|
+
const currentIndex = allSteps.indexOf(currentStep);
|
|
43
|
+
return {
|
|
44
|
+
nextStep: enum_1.OnboardingSteps.USER_DETAILS,
|
|
45
|
+
steps: allSteps,
|
|
46
|
+
progression: (currentIndex + 1) / allSteps.length,
|
|
47
|
+
stepIndex: currentIndex,
|
|
48
|
+
isLastStep,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
exports.getOnboardingProgression = getOnboardingProgression;
|