@mcdylanproperenterprise/nodejs-proper-money-types 0.0.1 → 0.0.3
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/package.json +1 -1
- package/user.ts +21 -116
package/package.json
CHANGED
package/user.ts
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
import { TJwtToken } from "./middleware";
|
|
2
1
|
import {
|
|
3
2
|
ESubscriptionEntitlement,
|
|
4
3
|
EVerificationOneTimePasswordType,
|
|
5
4
|
} from "./enum";
|
|
6
5
|
|
|
6
|
+
export type TUser = {
|
|
7
|
+
_id: string;
|
|
8
|
+
phoneNumber: string;
|
|
9
|
+
profileImage: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
language: string;
|
|
12
|
+
currency: string;
|
|
13
|
+
sharedUserId: string | null;
|
|
14
|
+
sharedUserInfo: TSharedUserInfo;
|
|
15
|
+
lastActiveAt: Date;
|
|
16
|
+
premiumMemberTrialEndAt: Date | null;
|
|
17
|
+
topUpMemberRole: ESubscriptionEntitlement | null;
|
|
18
|
+
topUpMemberEndAt: Date | null;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
notificationToken: string | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
7
23
|
export type TMemberFeature = {
|
|
8
24
|
name: ESubscriptionEntitlement;
|
|
9
25
|
maximumCategories: number;
|
|
@@ -39,132 +55,19 @@ export const memberFeaturePremium: TMemberFeature = {
|
|
|
39
55
|
export type TSharedUserInfo = {
|
|
40
56
|
_id: string;
|
|
41
57
|
id: string;
|
|
42
|
-
|
|
58
|
+
profileImage: string;
|
|
43
59
|
emailAddress: string | null;
|
|
44
60
|
phoneNumber: string | null;
|
|
45
61
|
displayName: string;
|
|
46
62
|
notificationToken: string | null;
|
|
47
63
|
} | null;
|
|
48
64
|
|
|
49
|
-
export type
|
|
50
|
-
userId: String;
|
|
51
|
-
accessToken: String;
|
|
52
|
-
refreshToken: String;
|
|
53
|
-
email: String;
|
|
54
|
-
name: String | null;
|
|
55
|
-
picture: String | null;
|
|
56
|
-
} | null;
|
|
57
|
-
|
|
58
|
-
export type TSSOapple = {
|
|
59
|
-
identityToken: string;
|
|
60
|
-
email: string;
|
|
61
|
-
userId: string;
|
|
62
|
-
accessToken: string;
|
|
63
|
-
refreshToken: string;
|
|
64
|
-
authorizationCode: string;
|
|
65
|
-
} | null;
|
|
66
|
-
|
|
67
|
-
export type TSSOfacebook = {
|
|
68
|
-
userId: String;
|
|
69
|
-
accessToken: String;
|
|
70
|
-
email: String;
|
|
71
|
-
name: String | null;
|
|
72
|
-
} | null;
|
|
73
|
-
|
|
74
|
-
export type TUser = {
|
|
75
|
-
_id: string;
|
|
76
|
-
phoneNumber: string;
|
|
77
|
-
profileImageAsset: TProfileImageAsset;
|
|
78
|
-
displayName: string;
|
|
79
|
-
language: string;
|
|
80
|
-
currency: string;
|
|
81
|
-
sharedUserId: string | null;
|
|
82
|
-
sharedUserInfo: TSharedUserInfo;
|
|
83
|
-
lastActiveAt: Date;
|
|
84
|
-
premiumMemberTrialEndAt: Date | null;
|
|
85
|
-
topUpMemberRole: ESubscriptionEntitlement | null;
|
|
86
|
-
topUpMemberEndAt: Date | null;
|
|
87
|
-
createdAt: Date;
|
|
88
|
-
notificationToken: string | null;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export type TProfileImageAsset = {
|
|
92
|
-
emoji: string;
|
|
93
|
-
backgroundColor: string;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type TUserGetInfoResponse = TUser;
|
|
97
|
-
|
|
98
|
-
export type TUserContinueWithGoogleBody = {
|
|
99
|
-
deviceUniqueId: string;
|
|
100
|
-
idToken: string;
|
|
101
|
-
serverAuthCode: string;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export type TUserContinueWithGoogleResponse = TJwtToken;
|
|
105
|
-
|
|
106
|
-
export type TUserContinueWithAppleBody = {
|
|
107
|
-
authorizationCode: string;
|
|
108
|
-
deviceUniqueId: string;
|
|
109
|
-
identityToken: string;
|
|
110
|
-
appleUserId: string;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export type TUserContinueWithAppleResponse = TJwtToken;
|
|
114
|
-
|
|
115
|
-
export type TUserContinueWithFacebookBody = {
|
|
116
|
-
deviceUniqueId: string;
|
|
117
|
-
accessToken: string;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export type TUserContinueWithFacebookResponse = TJwtToken;
|
|
121
|
-
|
|
122
|
-
export type TUserRegisterNotificationBody = {
|
|
123
|
-
notificationToken: string;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export type TUserUpdateUserProfileAssetBody = TProfileImageAsset;
|
|
127
|
-
|
|
128
|
-
export type TUserUpdateUserDisplayNameBody = {
|
|
129
|
-
displayName: string;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export type TUserUpdateUserLanguageBody = {
|
|
133
|
-
language: string;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export type TUserUpdateUserCurrencyBody = {
|
|
137
|
-
currency: string;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export type TUserGetProfileImageAssetsResponse = {
|
|
141
|
-
emojis: string[];
|
|
142
|
-
backgroundColors: string[];
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export type TUserResetPasswordBody = {
|
|
146
|
-
deviceUniqueId: string;
|
|
147
|
-
emailAddress?: string;
|
|
148
|
-
phoneNumber?: string;
|
|
149
|
-
password: string;
|
|
150
|
-
oneTimePassword: string;
|
|
151
|
-
oneTimePasswordType: EVerificationOneTimePasswordType;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
export type TUserChangePasswordBody = {
|
|
155
|
-
currentPassword: string;
|
|
156
|
-
newPassword: string;
|
|
157
|
-
};
|
|
65
|
+
export type TUserDetailResponse = TUser;
|
|
158
66
|
|
|
159
67
|
export type TUserRemoveSharedUserBody = {
|
|
160
68
|
sharedUserId: string;
|
|
161
69
|
};
|
|
162
70
|
|
|
163
|
-
export type TUserSendGlobalNotificationBody = {
|
|
164
|
-
title: string;
|
|
165
|
-
body: string;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
71
|
export type TUserRequestOTPBody = {
|
|
169
72
|
phoneNumber: string;
|
|
170
73
|
};
|
|
@@ -172,3 +75,5 @@ export type TUserRequestOTPBody = {
|
|
|
172
75
|
export type TUserRequestOTPResponse = {
|
|
173
76
|
verificationOneTimePasswordType: EVerificationOneTimePasswordType;
|
|
174
77
|
};
|
|
78
|
+
|
|
79
|
+
export type TUserUpdateBody = Partial<TUser>;
|