@hy-capital/api-habit-tracker-types 1.0.70 → 1.0.72
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/common.d.ts +5 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/frontend-user.d.ts +1 -0
- package/dist/habit.d.ts +10 -12
- package/dist/habit.js +3 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +7 -3
- package/dist/quote.d.ts +2 -4
- package/dist/user-daily-pledge.d.ts +7 -0
- package/dist/user-daily-pledge.js +2 -0
- package/dist/user-match-rate.d.ts +2 -4
- package/dist/user-xp.d.ts +2 -4
- package/dist/user.d.ts +6 -4
- package/package.json +1 -1
- package/src/common.ts +5 -0
- package/src/config.ts +1 -1
- package/src/frontend-user.ts +1 -0
- package/src/habit.ts +53 -55
- package/src/index.ts +7 -3
- package/src/quote.ts +2 -5
- package/src/user-daily-pledge.ts +8 -0
- package/src/user-match-rate.ts +2 -5
- package/src/user-xp.ts +2 -5
- package/src/user.ts +6 -4
- package/dist/user-stats.d.ts +0 -7
- package/src/user-stats.ts +0 -8
- /package/dist/{user-stats.js → common.js} +0 -0
package/dist/common.d.ts
ADDED
package/dist/config.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const appName = "
|
1
|
+
export declare const appName = "LifeFix";
|
package/dist/config.js
CHANGED
package/dist/frontend-user.d.ts
CHANGED
package/dist/habit.d.ts
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
import { TopicType } from './user-topic';
|
2
|
+
import { IdAndTimeStamps } from './common';
|
2
3
|
export type HabitTime = 'Morning' | 'Afternoon' | 'Evening' | 'Anytime';
|
3
4
|
export type HabitDifficulty = 1 | 2 | 3;
|
4
5
|
export type HabitDay = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
|
5
|
-
export declare const allHabitDays: HabitDay[];
|
6
|
-
export declare const habitDateFormat = "DD-MM-YYYY";
|
7
|
-
export declare const habitDayToNumberMappings: Record<HabitDay, number>;
|
8
|
-
export declare const numberToHabitDayMappings: Record<number, HabitDay>;
|
9
|
-
export declare const ProgramObjectivesByTopic: Record<TopicType, string[]>;
|
10
6
|
export interface HabitType {
|
11
7
|
id: number;
|
12
8
|
name: string;
|
@@ -36,13 +32,13 @@ export interface BaseHabit {
|
|
36
32
|
min_days_per_week: number;
|
37
33
|
habit_type_id: number;
|
38
34
|
}
|
35
|
+
export interface DbHabit extends BaseHabit, IdAndTimeStamps {
|
36
|
+
}
|
39
37
|
export interface PatchHabitRequest {
|
40
38
|
partialHabit: Partial<BaseHabit>;
|
41
39
|
habitAction?: HabitAction;
|
42
40
|
}
|
43
41
|
export type HabitAction = 'To Done' | 'To Todo';
|
44
|
-
export declare const XP_INCREMENT_AMOUNT = 10;
|
45
|
-
export declare const XP_DECREMENT_AMOUNT = -7;
|
46
42
|
export interface RemindMeAtTime {
|
47
43
|
hour: number;
|
48
44
|
minute: number;
|
@@ -63,11 +59,6 @@ export interface MonthlyNotification {
|
|
63
59
|
minute: number;
|
64
60
|
notificationId: string;
|
65
61
|
}
|
66
|
-
export interface DbHabit extends BaseHabit {
|
67
|
-
id: number;
|
68
|
-
created_at: string;
|
69
|
-
updated_at: string;
|
70
|
-
}
|
71
62
|
export interface HabitStats {
|
72
63
|
mostMasteredHabit: {
|
73
64
|
habit: DbHabit | null;
|
@@ -92,6 +83,13 @@ export interface HabitsResponse {
|
|
92
83
|
habits: DbHabit[];
|
93
84
|
stats: HabitStats;
|
94
85
|
}
|
86
|
+
export declare const XP_INCREMENT_AMOUNT = 10;
|
87
|
+
export declare const XP_DECREMENT_AMOUNT = -7;
|
88
|
+
export declare const allHabitDays: HabitDay[];
|
89
|
+
export declare const habitDateFormat = "DD-MM-YYYY";
|
90
|
+
export declare const habitDayToNumberMappings: Record<HabitDay, number>;
|
91
|
+
export declare const numberToHabitDayMappings: Record<number, HabitDay>;
|
92
|
+
export declare const ProgramObjectivesByTopic: Record<TopicType, string[]>;
|
95
93
|
export declare const habitTimeToClockTime: Record<HabitTime, {
|
96
94
|
hour: number;
|
97
95
|
minute: number;
|
package/dist/habit.js
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.habitTypesByTopicType = exports.habitTimeToClockTime = exports.
|
3
|
+
exports.habitTypesByTopicType = exports.habitTimeToClockTime = exports.ProgramObjectivesByTopic = exports.numberToHabitDayMappings = exports.habitDayToNumberMappings = exports.habitDateFormat = exports.allHabitDays = exports.XP_DECREMENT_AMOUNT = exports.XP_INCREMENT_AMOUNT = void 0;
|
4
|
+
exports.XP_INCREMENT_AMOUNT = 10;
|
5
|
+
exports.XP_DECREMENT_AMOUNT = -7;
|
4
6
|
exports.allHabitDays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
5
7
|
exports.habitDateFormat = 'DD-MM-YYYY';
|
6
8
|
exports.habitDayToNumberMappings = {
|
@@ -43,8 +45,6 @@ exports.ProgramObjectivesByTopic = {
|
|
43
45
|
'Revenue'
|
44
46
|
]
|
45
47
|
};
|
46
|
-
exports.XP_INCREMENT_AMOUNT = 10;
|
47
|
-
exports.XP_DECREMENT_AMOUNT = -7;
|
48
48
|
exports.habitTimeToClockTime = {
|
49
49
|
Morning: {
|
50
50
|
hour: 9,
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
export * from './
|
2
|
-
export * from './user-topic';
|
1
|
+
export * from './config';
|
3
2
|
export * from './frontend-user';
|
4
3
|
export * from './habit';
|
5
|
-
export * from './
|
4
|
+
export * from './quote';
|
5
|
+
export * from './user';
|
6
|
+
export * from './user-daily-pledge';
|
7
|
+
export * from './user-match-rate';
|
8
|
+
export * from './user-topic';
|
9
|
+
export * from './user-xp';
|
package/dist/index.js
CHANGED
@@ -14,8 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./
|
18
|
-
__exportStar(require("./user-topic"), exports);
|
17
|
+
__exportStar(require("./config"), exports);
|
19
18
|
__exportStar(require("./frontend-user"), exports);
|
20
19
|
__exportStar(require("./habit"), exports);
|
21
|
-
__exportStar(require("./
|
20
|
+
__exportStar(require("./quote"), exports);
|
21
|
+
__exportStar(require("./user"), exports);
|
22
|
+
__exportStar(require("./user-daily-pledge"), exports);
|
23
|
+
__exportStar(require("./user-match-rate"), exports);
|
24
|
+
__exportStar(require("./user-topic"), exports);
|
25
|
+
__exportStar(require("./user-xp"), exports);
|
package/dist/quote.d.ts
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
import { TopicType } from './user-topic';
|
2
|
+
import { IdAndTimeStamps } from './common';
|
2
3
|
export interface BaseQuote {
|
3
4
|
text: string;
|
4
5
|
author: string;
|
5
6
|
avatar_url: string | null;
|
6
7
|
topic_type: TopicType;
|
7
8
|
}
|
8
|
-
export interface DbQuote extends BaseQuote {
|
9
|
-
id: number;
|
10
|
-
created_at: string;
|
11
|
-
updated_at: string;
|
9
|
+
export interface DbQuote extends BaseQuote, IdAndTimeStamps {
|
12
10
|
}
|
@@ -1,11 +1,9 @@
|
|
1
1
|
import { TopicType } from './user-topic';
|
2
|
+
import { IdAndTimeStamps } from './common';
|
2
3
|
export interface BaseUserMatchRate {
|
3
4
|
match_rate: number;
|
4
5
|
user_id: number;
|
5
6
|
topic_type: TopicType;
|
6
7
|
}
|
7
|
-
export interface DbUserMatchRate extends BaseUserMatchRate {
|
8
|
-
id: number;
|
9
|
-
created_at: string;
|
10
|
-
updated_at: string;
|
8
|
+
export interface DbUserMatchRate extends BaseUserMatchRate, IdAndTimeStamps {
|
11
9
|
}
|
package/dist/user-xp.d.ts
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
import { TopicType } from './user-topic';
|
2
|
+
import { IdAndTimeStamps } from './common';
|
2
3
|
export interface BaseUserXp {
|
3
4
|
user_id: number;
|
4
5
|
topic_type: TopicType;
|
5
6
|
score: number;
|
6
7
|
}
|
7
|
-
export interface DbUserXp extends BaseUserXp {
|
8
|
-
id: number;
|
9
|
-
created_at: string;
|
10
|
-
updated_at: string;
|
8
|
+
export interface DbUserXp extends BaseUserXp, IdAndTimeStamps {
|
11
9
|
}
|
12
10
|
export type InputUserXp = Pick<DbUserXp, 'user_id' | 'topic_type' | 'score'>;
|
package/dist/user.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { TopicType } from './user-topic';
|
2
|
-
|
3
|
-
|
2
|
+
import { IdAndTimeStamps } from './common';
|
3
|
+
export interface BaseUser {
|
4
4
|
name: string | null;
|
5
5
|
email: string | null;
|
6
6
|
apple_id: string;
|
@@ -9,8 +9,9 @@ export interface DbUser {
|
|
9
9
|
expo_push_token: string;
|
10
10
|
daily_progress_notification: string | null;
|
11
11
|
selected_topic_type: TopicType | null;
|
12
|
-
|
13
|
-
|
12
|
+
has_seen_onboarding_videos: boolean;
|
13
|
+
}
|
14
|
+
export interface DbUser extends BaseUser, IdAndTimeStamps {
|
14
15
|
}
|
15
16
|
export type InputUser = Pick<DbUser, 'email' | 'timezone' | 'apple_id'>;
|
16
17
|
export interface CreateUserRequest extends InputUser {
|
@@ -23,5 +24,6 @@ export interface UpdateUserRequest {
|
|
23
24
|
expo_push_token?: string;
|
24
25
|
daily_progress_notification?: string;
|
25
26
|
selected_topic_type?: TopicType;
|
27
|
+
has_seen_onboarding_videos?: boolean;
|
26
28
|
}
|
27
29
|
export declare const defaultDailyProgressNotificationTime = "20:10";
|
package/package.json
CHANGED
package/src/common.ts
ADDED
package/src/config.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const appName = '
|
1
|
+
export const appName = 'LifeFix';
|
package/src/frontend-user.ts
CHANGED
package/src/habit.ts
CHANGED
@@ -1,54 +1,9 @@
|
|
1
1
|
import {TopicType} from './user-topic';
|
2
|
+
import {IdAndTimeStamps} from './common';
|
2
3
|
|
3
4
|
export type HabitTime = 'Morning' | 'Afternoon' | 'Evening' | 'Anytime';
|
4
5
|
export type HabitDifficulty = 1 | 2 | 3;
|
5
6
|
export type HabitDay = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
|
6
|
-
export const allHabitDays: HabitDay[] = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
7
|
-
|
8
|
-
export const habitDateFormat = 'DD-MM-YYYY';
|
9
|
-
|
10
|
-
export const habitDayToNumberMappings: Record<HabitDay, number> = {
|
11
|
-
Monday: 1,
|
12
|
-
Tuesday: 2,
|
13
|
-
Wednesday: 3,
|
14
|
-
Thursday: 4,
|
15
|
-
Friday: 5,
|
16
|
-
Saturday: 6,
|
17
|
-
Sunday: 0
|
18
|
-
};
|
19
|
-
|
20
|
-
export const numberToHabitDayMappings: Record<number, HabitDay> = {
|
21
|
-
1: 'Monday',
|
22
|
-
2: 'Tuesday',
|
23
|
-
3: 'Wednesday',
|
24
|
-
4: 'Thursday',
|
25
|
-
5: 'Friday',
|
26
|
-
6: 'Saturday',
|
27
|
-
0: 'Sunday'
|
28
|
-
};
|
29
|
-
|
30
|
-
export const ProgramObjectivesByTopic: Record<TopicType, string[]> = {
|
31
|
-
Dating: [
|
32
|
-
'Attraction',
|
33
|
-
'Confidence',
|
34
|
-
'Charisma'
|
35
|
-
],
|
36
|
-
Sleep: [
|
37
|
-
'Discipline',
|
38
|
-
'Peace',
|
39
|
-
'Energy'
|
40
|
-
],
|
41
|
-
Fitness: [
|
42
|
-
'Strength',
|
43
|
-
'Discipline',
|
44
|
-
'Aesthetics'
|
45
|
-
],
|
46
|
-
'Side Hustle': [
|
47
|
-
'Focus',
|
48
|
-
'Marketing',
|
49
|
-
'Revenue'
|
50
|
-
]
|
51
|
-
};
|
52
7
|
|
53
8
|
export interface HabitType {
|
54
9
|
id: number;
|
@@ -81,6 +36,8 @@ export interface BaseHabit {
|
|
81
36
|
habit_type_id: number;
|
82
37
|
}
|
83
38
|
|
39
|
+
export interface DbHabit extends BaseHabit, IdAndTimeStamps {}
|
40
|
+
|
84
41
|
export interface PatchHabitRequest {
|
85
42
|
partialHabit: Partial<BaseHabit>;
|
86
43
|
habitAction?: HabitAction;
|
@@ -88,9 +45,6 @@ export interface PatchHabitRequest {
|
|
88
45
|
|
89
46
|
export type HabitAction = 'To Done' | 'To Todo';
|
90
47
|
|
91
|
-
export const XP_INCREMENT_AMOUNT = 10;
|
92
|
-
export const XP_DECREMENT_AMOUNT = -7;
|
93
|
-
|
94
48
|
export interface RemindMeAtTime {
|
95
49
|
hour: number;
|
96
50
|
minute: number;
|
@@ -115,12 +69,6 @@ export interface MonthlyNotification {
|
|
115
69
|
notificationId: string;
|
116
70
|
}
|
117
71
|
|
118
|
-
export interface DbHabit extends BaseHabit {
|
119
|
-
id: number;
|
120
|
-
created_at: string
|
121
|
-
updated_at: string
|
122
|
-
}
|
123
|
-
|
124
72
|
export interface HabitStats {
|
125
73
|
mostMasteredHabit: {
|
126
74
|
habit: DbHabit | null,
|
@@ -147,6 +95,56 @@ export interface HabitsResponse {
|
|
147
95
|
stats: HabitStats;
|
148
96
|
}
|
149
97
|
|
98
|
+
export const XP_INCREMENT_AMOUNT = 10;
|
99
|
+
export const XP_DECREMENT_AMOUNT = -7;
|
100
|
+
|
101
|
+
export const allHabitDays: HabitDay[] = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
102
|
+
|
103
|
+
export const habitDateFormat = 'DD-MM-YYYY';
|
104
|
+
|
105
|
+
export const habitDayToNumberMappings: Record<HabitDay, number> = {
|
106
|
+
Monday: 1,
|
107
|
+
Tuesday: 2,
|
108
|
+
Wednesday: 3,
|
109
|
+
Thursday: 4,
|
110
|
+
Friday: 5,
|
111
|
+
Saturday: 6,
|
112
|
+
Sunday: 0
|
113
|
+
};
|
114
|
+
|
115
|
+
export const numberToHabitDayMappings: Record<number, HabitDay> = {
|
116
|
+
1: 'Monday',
|
117
|
+
2: 'Tuesday',
|
118
|
+
3: 'Wednesday',
|
119
|
+
4: 'Thursday',
|
120
|
+
5: 'Friday',
|
121
|
+
6: 'Saturday',
|
122
|
+
0: 'Sunday'
|
123
|
+
};
|
124
|
+
|
125
|
+
export const ProgramObjectivesByTopic: Record<TopicType, string[]> = {
|
126
|
+
Dating: [
|
127
|
+
'Attraction',
|
128
|
+
'Confidence',
|
129
|
+
'Charisma'
|
130
|
+
],
|
131
|
+
Sleep: [
|
132
|
+
'Discipline',
|
133
|
+
'Peace',
|
134
|
+
'Energy'
|
135
|
+
],
|
136
|
+
Fitness: [
|
137
|
+
'Strength',
|
138
|
+
'Discipline',
|
139
|
+
'Aesthetics'
|
140
|
+
],
|
141
|
+
'Side Hustle': [
|
142
|
+
'Focus',
|
143
|
+
'Marketing',
|
144
|
+
'Revenue'
|
145
|
+
]
|
146
|
+
};
|
147
|
+
|
150
148
|
export const habitTimeToClockTime: Record<HabitTime, { hour: number, minute: number }> = {
|
151
149
|
Morning: {
|
152
150
|
hour: 9,
|
package/src/index.ts
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
export * from './
|
2
|
-
export * from './user-topic';
|
1
|
+
export * from './config';
|
3
2
|
export * from './frontend-user';
|
4
3
|
export * from './habit';
|
5
|
-
export * from './
|
4
|
+
export * from './quote';
|
5
|
+
export * from './user';
|
6
|
+
export * from './user-daily-pledge';
|
7
|
+
export * from './user-match-rate';
|
8
|
+
export * from './user-topic';
|
9
|
+
export * from './user-xp';
|
package/src/quote.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import {TopicType} from './user-topic';
|
2
|
+
import {IdAndTimeStamps} from './common';
|
2
3
|
|
3
4
|
export interface BaseQuote {
|
4
5
|
text: string;
|
@@ -7,8 +8,4 @@ export interface BaseQuote {
|
|
7
8
|
topic_type: TopicType;
|
8
9
|
}
|
9
10
|
|
10
|
-
export interface DbQuote extends BaseQuote {
|
11
|
-
id: number;
|
12
|
-
created_at: string
|
13
|
-
updated_at: string
|
14
|
-
}
|
11
|
+
export interface DbQuote extends BaseQuote, IdAndTimeStamps {}
|
package/src/user-match-rate.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import {TopicType} from './user-topic';
|
2
|
+
import {IdAndTimeStamps} from './common';
|
2
3
|
|
3
4
|
export interface BaseUserMatchRate {
|
4
5
|
match_rate: number;
|
@@ -6,8 +7,4 @@ export interface BaseUserMatchRate {
|
|
6
7
|
topic_type: TopicType;
|
7
8
|
}
|
8
9
|
|
9
|
-
export interface DbUserMatchRate extends BaseUserMatchRate {
|
10
|
-
id: number;
|
11
|
-
created_at: string
|
12
|
-
updated_at: string
|
13
|
-
}
|
10
|
+
export interface DbUserMatchRate extends BaseUserMatchRate, IdAndTimeStamps {}
|
package/src/user-xp.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import {TopicType} from './user-topic';
|
2
|
+
import {IdAndTimeStamps} from './common';
|
2
3
|
|
3
4
|
export interface BaseUserXp {
|
4
5
|
user_id: number;
|
@@ -6,10 +7,6 @@ export interface BaseUserXp {
|
|
6
7
|
score: number;
|
7
8
|
}
|
8
9
|
|
9
|
-
export interface DbUserXp extends BaseUserXp {
|
10
|
-
id: number;
|
11
|
-
created_at: string
|
12
|
-
updated_at: string
|
13
|
-
}
|
10
|
+
export interface DbUserXp extends BaseUserXp, IdAndTimeStamps {}
|
14
11
|
|
15
12
|
export type InputUserXp = Pick<DbUserXp, 'user_id' | 'topic_type' | 'score'>;
|
package/src/user.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import {TopicType} from './user-topic';
|
2
|
+
import {IdAndTimeStamps} from './common';
|
2
3
|
|
3
|
-
export interface
|
4
|
-
id: number;
|
4
|
+
export interface BaseUser {
|
5
5
|
name: string | null;
|
6
6
|
email: string | null;
|
7
7
|
apple_id: string;
|
@@ -10,10 +10,11 @@ export interface DbUser {
|
|
10
10
|
expo_push_token: string;
|
11
11
|
daily_progress_notification: string | null;
|
12
12
|
selected_topic_type: TopicType | null;
|
13
|
-
|
14
|
-
updated_at: string;
|
13
|
+
has_seen_onboarding_videos: boolean;
|
15
14
|
}
|
16
15
|
|
16
|
+
export interface DbUser extends BaseUser, IdAndTimeStamps {}
|
17
|
+
|
17
18
|
export type InputUser = Pick<DbUser, 'email' | 'timezone' | 'apple_id'>;
|
18
19
|
|
19
20
|
export interface CreateUserRequest extends InputUser {
|
@@ -27,6 +28,7 @@ export interface UpdateUserRequest {
|
|
27
28
|
expo_push_token?: string;
|
28
29
|
daily_progress_notification?: string;
|
29
30
|
selected_topic_type?: TopicType;
|
31
|
+
has_seen_onboarding_videos?: boolean;
|
30
32
|
}
|
31
33
|
|
32
34
|
export const defaultDailyProgressNotificationTime = '20:10';
|
package/dist/user-stats.d.ts
DELETED
package/src/user-stats.ts
DELETED
File without changes
|